[Rd] write.csv (PR#7992)

maechler@stat.math.ethz.ch maechler at stat.math.ethz.ch
Thu Jul 7 18:27:56 CEST 2005


This topic already came up about a week ago on R-devel
 Subject: write.csv suggestion

 [ too bad that "R-devel" is not available via  RSiteSearch() ...
    {I could send you the back archives, Jon, if you are interested} ]

There, Brian Ripley, explained why this is not a bug, since
it works as documented, "CSV" files are well defined entities
and you can always use write.table() if you want to be flexible.

Brian also changed things for R-devel {to be R 2.2.x} such that
its help page, see
   http://stat.ethz.ch/R-manual/R-devel/library/base/html/write.table.html ,
now  has

> Usage:
> 	 . . . .
>
>      write.csv(...)
>      write.csv2(...)
>
> . . . .
>
>
> Arguments:
> 	 . . . .
>
>      ...: arguments to 'write.table': 'col.names', 'sep', 'dec' and
>           'qmethod' cannot be altered. 

which should make the intention of the write.csv*() wrapper
functions a bit more clear.

Regards,
Martin Maechler, ETH Zurich

>>>>> "arnima" == arnima  <arnima at u.washington.edu>
>>>>>     on Thu,  7 Jul 2005 05:21:43 +0200 (CEST) writes:

    arnima> The write.csv() function is currently implemented as
    arnima> function (..., col.names=NA, sep=",", qmethod="double")
    arnima> {
    arnima> write.table(..., col.names=NA, sep=",", qmethod="double")
    arnima> }

    arnima> Surely, it should be

    arnima> function (..., col.names=NA, sep=",", qmethod="double")
    arnima> {
    arnima> write.table(..., col.names=col.names, sep=sep, qmethod=qmethod)
    arnima> }

    arnima> so that the user arguments serve a purpose. This notion is reflected in 
    arnima> the implementation of read.csv(), for example, where sep=sep, quote=quote, 
    arnima> etc.


    arnima> Arni

    arnima> R 2.1.1pat 2005-07-04 on WinXP



More information about the R-devel mailing list