[R] Update CSV file content

Jim Lemon jim at bitwrit.com.au
Tue Oct 9 10:56:01 CEST 2012


On 10/08/2012 08:20 PM, Rantony wrote:
> Hi,
>
> 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 can we update by writing into the csv file ? i dont want to delete
> entire data and write data from dataframe
> into csv - like that. I need direct file update !

Hi Antony,
If it's a small CSV file, you can just alter it in a text editor. 
Otherwise, that's what spreadsheets are for.

Jim




More information about the R-help mailing list