Skip to content
Prev 166256 / 398502 Next

Another newbie question

Problem: 
I have a data frame with 1s and 0s denoting presence/absence of species
(columns) for particular plot measurements (rows). What I want to do is make
a new column whose entries for each row is a list of the column names in
which a species is present (ie. for row one its entry might read:
"sp1","sp2", etc.). I've tried various functions etc. but can't seem to get
the syntax right/ the correct combination of functions.
Thanks in advance!
-Allen