[R] How to keep spacing in column name while reading data from data frame?

Petr PIKAL petr.pikal at precheza.cz
Wed Apr 18 07:11:19 CEST 2012


Hi

> 
> Hi, 
> 
>  I am working on dataframe and column names are multiwords but when i 
read
> it it become one word with space relplaced by "."  How can i keep 
normall
> spacing reading file. 
> 
> for e.g. 
> 
> input file
> 
> Data Test       Data Out
> 3                        5
> 5                        4
> 
> But when i read this data in table it becomes
> Data.Test        Data.Out
> 3                        5
> 5                        4
> 
> Pls help me out. Thanks

You need to change check.names parameter when reading in your file.

Regards
Petr


> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-keep-
> 
spacing-in-column-name-while-reading-data-from-data-frame-tp4566585p4566585.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list