[R] Re : help to replace variable value

Wu Gong ghowoo at gmail.com
Fri May 28 17:35:33 CEST 2010


Do you mean replace values of a column?
> df <- data.frame("Jan" = 1:3,"Feb" = 11:13)
> df
  Jan Feb
1   1  11
2   2  12
3   3  13
> df$Jan <- 21:23
> df
  Jan Feb
1  21  11
2  22  12
3  23  13

-----
A R learner.
-- 
View this message in context: http://r.789695.n4.nabble.com/Re-help-to-replace-variable-value-tp2234317p2234775.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list