[R] Re : help to replace variable value
Ivan Calandra
ivan.calandra at uni-hamburg.de
Fri May 28 11:23:37 CEST 2010
Hi!
Not sure to understand what you mean...
Would
data[[var1]]
do what you're looking for?
HTH,
Ivan
Le 5/28/2010 11:13, Mohan L a écrit :
> Dear All,
>
> I have a data frame "data" with Jan , Feb as column. I using like this
> data$Jan to take Jan column. I have the Jan in another variable
>
> var1<- "Jan"
>
> data$var1
>
> I need to replace the variable value there . Any help will be greatly
> appreciated.
>
> Thanks& Rg
> Mohan L
>
> [[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.
>
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
More information about the R-help
mailing list