[R] removing zero rows from matrix/table

2008-04-22 Thread Patrick Zimmermann
Dear R-community, I have matrices/tables of different sizes which may contain rows with only zeros. Now I would like to delete these zero lines or create new matrices composed only of the non-zero lines. Columns only containing zeros I want to preserve. Here an example: [,1] [,2] [,3] [,4] [,5] [,

[R] composition of a matrix by matches between two data frames

2007-09-11 Thread Patrick Zimmermann
Dear R-users, I want to compose a new table (a presence/absence matrix of species in regions) by matches between two data frames. The first data frame has the species as header and the habitats in which they occure as elements. The second data frame has the regions as header and the occuring habit