Re: [R] Renaming variables

2013-09-20 Thread John Kane
age- > From: lordpree...@gmail.com > Sent: Fri, 20 Sep 2013 19:40:23 +0530 > To: r-help@r-project.org > Subject: [R] Renaming variables > > Hi, > > I guess this is pretty basic. > > I have 25 variables in the data file (name: score), i.e. X1,X2,.,X25. > >

Re: [R] Renaming variables

2013-09-20 Thread Clint Bowman
or with(score.plot(X1, X2)) Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600FAX:(360) 407-7534 Olympia,

Re: [R] Renaming variables

2013-09-20 Thread Aaron Mackey
On Fri, Sep 20, 2013 at 10:10 AM, Preetam Pal wrote: > I have 25 variables in the data file (name: score), i.e. X1,X2,.,X25. > > I dont want to use score$X1, score$X2 everytime I use these variables. > attach(score) plot(X1, X2) # etc. etc. -Aaron [[alternative HTML version delete

Re: [R] Renaming variables

2013-09-20 Thread Simon Zehnder
You haven't said yet, what object your 'data file' is. If you mean a data.frame I would use colnames(dataName) <- c("Col1Name", "col2Name", ….) Best Simon On Sep 20, 2013, at 4:10 PM, Preetam Pal wrote: > Hi, > > I guess this is pretty basic. > > I have 25 variables in the data file (name: s

[R] Renaming variables

2013-09-20 Thread Preetam Pal
Hi, I guess this is pretty basic. I have 25 variables in the data file (name: score), i.e. X1,X2,.,X25. I dont want to use score$X1, score$X2 everytime I use these variables. Is there a way I can rename all these variables as simply X1,X2,.X25 without writing 25 lines of code, one line

Re: [R] Renaming variables

2011-06-14 Thread Dennis Murphy
Hi: names() typically has to do with the names associated with *components* of a data frame or list, which appears to be what you have, reading between the lines. Here's a toy example: > mydf <- data.frame(a = rnorm(5)) > mydf a 1 1.291952883 2 -0.136706733 3 0.219528682 4 -0.17483

[R] Renaming variables

2011-06-14 Thread mosojn
Hi guys, I checked previous posts and I saw similar questions have been answered; they didn't help me solve my problem though. I am using R version 2.13.0 (2011-04-13), Platform: x86_64-pc-mingw32/x64 (64-bit) and I am having difficulties renaming variables. I tried with this command: names (old