[R] Header names when importing csv/excel data sets
Gabor Grothendieck
ggrothendieck at gmail.com
Tue Sep 15 03:44:49 CEST 2009
See the check.names= argument to read.table.
On Mon, Sep 14, 2009 at 9:40 PM, Steven Kang <stochastickang at gmail.com> wrote:
> Dear R users,
>
>
> Suppose the csv file contains header names such as *"Nike, dunk"*, *"Converse,
> All stars"* etc
>
> When imported to R (with header = T option), the column names are given by:
>
> *"Nike..dunk"* *"Converse..All.stars"*
>
> I have tried the following command to convert these column names to the
> original names as in the input source. (i.e substituting "*.."* to "*, *")
>
> chartr("..",", ",colnames(dat))
>> "Nike dunk" "Converse All stars"
>
> Not getting what Im expecting...
>
> Greatly appreciate for your help in resolving this matter.
>
>
>
>
>
>
> Steven
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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