Hi Matthias, If you know the column number you want to change, it is pretty straightforward.
## use the builtin mtcars dataset as an example ## and store it in variable, 'x' x <- mtcars ## change the second column name to "cylinder" colnames(x)[2] <- "cylinder" ## compare the column names of 'x' with the unchanged 'mtcars' colnames(mtcars) colnames(x) You might also consider R-sig mac if it is at all related to your OS. I have never really used macs so I am unfamiliar with Rs default interface on them, though I would assume it is similar. Good luck, Josh On Fri, May 6, 2011 at 3:05 PM, Matthias Neff <matthiasn...@gmx.ch> wrote: > Hello Joshua, > > Thank you for your prompt reply > > I am using: > R version 2.13.0 (2011-04-13) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > The problem is that the part where a window should pop up just doesn't > happen: I can click on the variable name as often as I want, nothing > happens. > > Maybe this is a problem specific to the mac version of R. > Do you know if there is an alternative way to change the variable name? > > Have a good day, > > Matthias > > On 06.05.2011, at 21:25, Joshua Wiley wrote: > > > >> Hi Matthias, >> >> What do you mean by "that doesn't work"? What platform are you using? >> Using: >> >>> sessionInfo() >> >> R version 2.13.0 (2011-04-13) >> Platform: x86_64-pc-mingw32/x64 (64-bit) >> >> fix(mydataframe) >> >> brings up the data editor, then if I click a variable name, and change >> it and shut down the data editor, it works just fine for me. You >> could also use the menu to bring up the editor. More information >> about the steps you are trying, the version of R, and exactly what is >> going wrong will help us help you. >> >> Best regards, >> >> Josh >> >> On Fri, May 6, 2011 at 11:32 AM, tornanddesperate <matthiasn...@gmx.ch> >> wrote: >>> >>> Hi again everybody >>> >>> I have I new problem concerning the editor of R. It is possible to add a >>> new variable column, but they all have the name "var1".I read somewhere >>> that >>> it should be possible to change the variable name by clicking on it, but >>> that doesn't work. Is that a bug or how is it possible to change the >>> variable header? >>> >>> Many thanks >>> >>> Matthias >>> >>> -- >>> View this message in context: >>> http://r.789695.n4.nabble.com/editor-not-possible-to-change-the-variable-name-tp3503864p3503864.html >>> Sent from the R help mailing list archive at Nabble.com. >>> >>> ______________________________________________ >>> R-help@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. >>> >> >> >> >> -- >> Joshua Wiley >> Ph.D. Student, Health Psychology >> University of California, Los Angeles >> http://www.joshuawiley.com/ > > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ ______________________________________________ R-help@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.