Dear all, I have a set of data that is 2 columns wide and 35,000 rows long (see extract below). The first column contains codes for tetrads (2km x 2km squares within NW England) and the second column has the names of moss species present within each tetrad. I wish to convert this into a matrix where rows are labelled by 'Tetrad', columns are labelled by 'Moss species' and each cell contains a 1 or 0 to denote the presence or absence of the moss species within each tetrad. This would be a matrix measuring 796 rows by 417 columns. Am I able to do this within R? I ran into problems trying to do it using the crosstab query in MS Access and the pivot table function on MS Excel because there are too many columns for these software to handle. Thanks very much in advance for any help.
All the best, Des Tetrad Moss species SD20S Amblystegium serpens var. serpens SD20S Barbula convoluta SD21S Brachythecium albicans SD20J Brachythecium rutabulum SD30S Bryum argenteum SD20S Bryum capillare ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
