[R] reduce three columns to one with the colnames
gunter.berton at gene.com
Mon May 13 17:09:48 CEST 2013
Cute answer, Pascal. It may even be the answer to the question the OP
should have asked, but I don't think it answered the question that was
asked. That might be:
c("red"[red], "green"[green], "blue"[blue])
On Mon, May 13, 2013 at 7:36 AM, Pascal Oettli <kridox at ymail.com> wrote:
> 2013/5/13 David Studer <studerov at gmail.com>
>> Hello everybody,
>> I have three variables "blue", "green" and "red" containing values 0 (no)
>> and 1 (yes).
>> How can I easily create another variable "colors" with the values "blue",
>> "green" and "red"?
>> I hope that you can understand my question and appreciate any solutions or
>> Thank you!
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> [[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.
Genentech Nonclinical Biostatistics
Internal Contact Info:
More information about the R-help