Re: [R] editor: not possible to change the variable name

From: Joshua Wiley <jwiley.psych_at_gmail.com>
Date: Fri, 06 May 2011 15:16:02 -0700

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 <MatthiasNeff_at_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 <MatthiasNeff_at_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_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.
>>>
>>
>>
>>
>> --
>> 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_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.
Received on Fri 06 May 2011 - 22:24:19 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 07 May 2011 - 00:50:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive