Dear R help, Apologies for the less than informative subject line. I will do my best to describe my problem.
Consider the following matrix: mdat <- matrix(c(1,0,1,1,1,0), nrow = 2, ncol=3, byrow=TRUE, dimnames = list(c("T1", "T2"), c("sp.1", "sp.2", "sp.3"))) mdat In my actual data I have time (rows) and species occurrences (0/1 values, columns). I want to count the number of new species that occur at a given time sample. For the matrix above the answer would be 1. Is there a simple way to figure out if the species has never occurred before and then sum them up? Thanks in advance, Micheal -- Michael Denslow I.W. Carpenter Jr. Herbarium [BOON] Department of Biology Appalachian State University Boone, North Carolina U.S.A. -- AND -- Communications Manager Southeast Regional Network of Expertise and Collections sernec.org 36.214177, -81.681480 +/- 3103 meters ______________________________________________ R-help@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.