From ripley at stats.ox.ac.uk  Thu Nov 24 17:27:04 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 24 Nov 2005 16:27:04 +0000 (GMT)
Subject: [Rd] write.csv
In-Reply-To: <4385E7E8.8030406@jhsph.edu>
References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAhSZy0zcp30KH/pKqSCi9sMKAAAAQAAAAcIeg/3SLt0iaHwGiAYoTZgEAAAAA@schaltenbrand.de>
	<4385E7E8.8030406@jhsph.edu>
Message-ID: <Pine.LNX.4.61.0511241624180.24426@gannet.stats>

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 at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley at 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



[Rd] write.csv
Prof Brian Ripley