[Rd] write.csv(..., col.names = FALSE) (PR#13202)

From: <stefan.albrecht_at_allianz.com>
Date: Fri, 24 Oct 2008 14:30:08 +0200 (CEST)


Full_Name: Stefan Albrecht
Version: 2.7.2 (and 2.8.0)
OS: Windows NT
Submission from: (NULL) (194.127.8.17)

Dear R Debug-Team,

in write.csv() it is not possible to set both row.names = FALSE, col.names = FALSE
since the col.names = FALSE gets overwritten:

> write.csv

function (...)
{

    Call <- match.call(expand.dots = TRUE)     for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]]))

        warning(gettextf("attempt to set '%s' ignored", argname), 
            domain = NA)

    rn <- eval.parent(Call$row.names)
    Call$col.names <- if (is.logical(rn) && !rn)

        TRUE
    else NA

    Call$sep <- ","
    Call$dec <- "."
    Call$qmethod <- "double"

    Call[[1]] <- as.name("write.table")
    eval.parent(Call)
}
<environment: namespace:utils>
>

This is not documented and should be changed, as it is an unintended reaction.

With many thanks and best regards,
Stefan



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 25 Oct 2008 - 21:08:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 27 Oct 2008 - 10:30:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive