[Rd] write.csv (PR#7992)
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Jul 7 20:44:18 CEST 2005
I just checked the svn. I did not realize it had been changed that way
so you are right, its better and possibly marginally acceptable although
I do think it would be preferable to set the defaults rather than the
values though I would no longer argue as strongly.
On 7/7/05, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 7/7/2005 12:38 PM, Gabor Grothendieck wrote:
> > This may not be inconsistent with the documentation but it is
> > inconsistent with good practice. Wrappers should, in general,
> > set the default values, as the poster rightly indicated, and not the
> > values themselves. Its not a coincidence that multiple people
> > have mentioned this.
>
> The old header (which teasingly displayed some parameters and then
> ignored them) was clearly wrong, but the new one doesn't display the
> parameters.
>
> This is pretty reasonable practice. It's a wrapper that provides a
> subset of the functionality, but is guaranteed to produce a legal file
> of the type it claims to produce. I don't see anything wrong with it.
>
> Duncan Murdoch
>
>
> >
> > On 7/7/05, maechler at stat.math.ethz.ch <maechler at stat.math.ethz.ch> wrote:
> >> 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
> >>
> >> ______________________________________________
> >> 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
>
>
More information about the R-devel
mailing list