Mr Akkara,

On 8 October 2012 05:20, Rantony <antony.akkara@ge.com> wrote:
>
> Here i have a csv file, it contain like this
>
> NAME   UPDATED
> ---------   --------------
> ABC        INDIA
> XYZ         UK
>
> My requirement what is, i need to change the value inside the csv file
> (instead of INDIA i need to make it USA).
>
> NAME   UPDATED
> ---------   --------------
> ABC        USA
> XYZ         UK
>
>
How about:

> read.data(csv-file-name, header=TRUE, stringsAsFactors=FALSE) ->
nameAndUpdated
> nameAndUpdated[nameAndUpdated[,2] == 'USA',2] <- 'INDIA'
> write.csv(nameAndUpdated, csv-file-name, header=TRUE)

-- 
Sent from my mobile device
Envoyait de mon portable

	[[alternative HTML version deleted]]


