ryszard.czerminski@pharma.novartis.com
2003-Oct-24 19:15 UTC
[R] How to avoid converting "_" to "." ?
It is minor thing, but how can I avoid converting "_" to "." ? e.g. I have a data set "test.csv" A,A_B,A_C,C,D X,11,0,13,14 Y,21,0,23,24 and when I read it all underscores are converted to dots (:<)> d <- read.csv("test.csv") > dA A.B A.C C D 1 X 11 0 13 14 2 Y 21 0 23 24 Ryszard [[alternative HTML version deleted]]
ryszard.czerminski at pharma.novartis.com writes:> It is minor thing, but how can I avoid converting "_" to "." ? > > e.g. I have a data set "test.csv" > > A,A_B,A_C,C,D > X,11,0,13,14 > Y,21,0,23,24 > > and when I read it all underscores are converted to dots (:<) > > > d <- read.csv("test.csv") > > d > A A.B A.C C D > 1 X 11 0 13 14 > 2 Y 21 0 23 24Add check.names=FALSE (see ?read.csv). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907