Re: [Rd] write.csv

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 24 Nov 2005 - 16:27:04 GMT

On Thu, 24 Nov 2005, Roger Peng wrote:

> If you don't want the row names, as 'write.csv()' writes out by default,
> try
>
> write.table(<object>, file = "myfile.csv", sep = ",", row.names = FALSE)

Or, better (since it sets other args to the appropriate values),

write.csv(<object>, file = "myfile.csv", row.names = FALSE)

That write.csv supports row.names = FALSE is explicitly mentioned on the help page.

>
> -roger
>
> Sven Schaltenbrand wrote:
>> hallo,
>>
>> i have a problem by writing a csv file
>> the first colum is filled with index numbers from 1 to n.
>> i have to unique two csv files once a week while one file is always the
>> same.
>> can anybody tell me, how to write the dataset into a csv file without the
>> first row of the indexnumbers.
>> x[,-1] does not wok as it eliminates the first "interesting" colum.
>> col.names is not accepted by r (do i habe to start a package first? which
>> one?)
>>
>> thx
>>
>> sven
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel@r-project.org mailing list
>>
https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri Nov 25 03:33:37 2005

This archive was generated by hypermail 2.1.8 : Thu 24 Nov 2005 - 21:21:10 GMT