Charles Thuo
2013-Sep-12 07:15 UTC
[R] how to retain dimnames while exporting from excel into r
v<- read.csv(file="sales.csv",header=TRUE) v i get an output whose column names are V1,V2, and so on but i would like to retain the original column names such as january through to december. Charles. [[alternative HTML version deleted]]
vikram ranga
2013-Sep-12 07:34 UTC
[R] Fwd: how to retain dimnames while exporting from excel into r
---------- Forwarded message ---------- From: vikram ranga <babuawara at gmail.com> Date: Thu, Sep 12, 2013 at 1:02 PM Subject: Re: [R] how to retain dimnames while exporting from excel into r To: Charles Thuo <tcmuigai at gmail.com> On Thu, Sep 12, 2013 at 12:45 PM, Charles Thuo <tcmuigai at gmail.com> wrote:> v<- read.csv(file="sales.csv",header=TRUE) > v >Is it possible to share the file? because the code looks fine> > i get an output whose column names are V1,V2, and so on but i would like to > retain the original column names such as january through to december. > > Charles. > > [[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.
Hi, Try with: read.csv(file="sales.csv",header=TRUE,check.names=FALSE) A.K. ----- Original Message ----- From: Charles Thuo <tcmuigai at gmail.com> To: r-help at r-project.org Cc: Sent: Thursday, September 12, 2013 3:15 AM Subject: [R] how to retain dimnames while exporting from excel into r v<- read.csv(file="sales.csv",header=TRUE) v i get an output whose column names are V1,V2, and so on but i would like to retain the original column names such as january through to december. Charles. ??? [[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.