[R] Data manipulation in a data.frame
smartpink111 at yahoo.com
Fri Feb 21 01:19:09 CET 2014
On Thursday, February 20, 2014 6:48 PM, arun <smartpink111 at yahoo.com> wrote:
May be this helps:
A$Variable <- rep(colnames(A[,-1]),nrow(A))[t(!!A[,-1])]
On Thursday, February 20, 2014 5:55 PM, ioanna ioannou <ii54250 at msn.com> wrote:
Assuming that I have a data frame
What I would like is to introduce a new column Variable such that:
How can I do it?
[[alternative HTML version deleted]]
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help