conformveg | R Documentation |
Conforms two community data tables to have the same set of columns (species)
conformveg(x, y, fillvalue = 0, verbose=FALSE)
x |
Community data, a site-by-species matrix. |
y |
Community data, a site-by-species matrix. |
fillvalue |
The value to be used to fill new entries in inflated matrices. |
verbose |
Displays information about the number of species shared between |
This function adds to x
as many new columns as columns of y
that are not in x
. The same is done for y
, so the two tables have the same set of columns when they are returned.
A list with the two inflated matrices x
and y
.
Miquel De Cáceres, Centre Tecnologic Forestal de Catalunya.
vegclust
, vegclass
## Loads data (38 columns and 33 species)
data(wetland)
dim(wetland)
## Splits wetland data into two matrices of 30x27 and 11x22
wetland.30 = wetland[1:30,]
wetland.30 = wetland.30[,colSums(wetland.30)>0]
dim(wetland.30)
wetland.11 = wetland[31:41,]
wetland.11 = wetland.11[,colSums(wetland.11)>0]
dim(wetland.11)
## Conforms the two matrices so they can eventually be merged
wetland.cf = conformveg(wetland.30, wetland.11)
dim(wetland.cf$x)
dim(wetland.cf$y)
names(wetland.cf$x)==names(wetland.cf$y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.