Hello, I'm working with a very large dataset (250,000+ lines in its' current form) that includes presence only data on various species (which is nested within different sites and sampling dates). I need to convert this into a dataset with presence/absence for each species. For example, I would like to expand "My current data" to "Desired data":
My current data Species Site Date a 1 1 b 1 1 b 1 2 c 1 3 Desired data Species Present Site Date a 1 1 1 b 1 1 1 c 0 1 1 a 0 2 2 b 1 2 2 C 0 2 2 a 0 3 3 b 0 3 3 c 1 3 3 I've scoured the web, including Rseek and haven't found a resolution (and note that a similar question was asked sometime in 2011 without an answer). Does anyone have any thoughts? Thank you in advance. -- Matthew D. Venesky, Ph.D. Postdoctoral Research Associate, Department of Integrative Biology, The University of South Florida, Tampa, FL 33620 Website: http://mvenesky.myweb.usf.edu/ [[alternative HTML version deleted]] ______________________________________________ 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.