[R] Convert a presence/ absence matrix to a list of presence only

From: antu <ananta.acharya_at_gmail.com>
Date: Fri, 22 Apr 2011 11:10:13 -0700 (PDT)


this thread
(
http://r.789695.n4.nabble.com/how-to-combine-presence-only-data-sets-to-one-presence-absence-table-td830140.html ) covered the need for making present list list to a matrix,

Now, I ran into an opposite problem. I have a data matrix with 0, 1 on them, what I need now is list of presence only for each column name

ie, this is what I have

        spl_A	spl_B	spl_C 
spcs1	1	1	0 
spcs2	1	0	1 
spcs3	0	1	1 


this is what I need

spl_A	  spl_B	spl_C 
spcs1  spcs1	spcs2 
spcs2	 spcs3	spcs3 



Thank you

--
View this message in context: http://r.789695.n4.nabble.com/Convert-a-presence-absence-matrix-to-a-list-of-presence-only-tp3468479p3468479.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Sat 23 Apr 2011 - 00:26:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Apr 2011 - 04:00:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive