[R] Arbirtrary column names with write.csv

Rafael Laboissiere rafael.laboissiere at inserm.fr
Tue Mar 3 12:10:05 CET 2009


Is there a way to prevent write.csv to transform the column names a la
make.names?  I mean, if I write the code:

    x <- structure (NULL)
    x [["a+b"]] <- c (1,2)
    write.csv (x, file = "foo.csv", row.names = FALSE, quote = FALSE)

I get in foo.csv:

a.b
1
2

but I want:

a+b
1
2

Any suggestions?

Cheers,

-- 
Rafael Laboissiere




More information about the R-help mailing list