matchTaxa: Make the taxa in two different sample * taxa matrices match

View source: R/predict.R

matchTaxaR Documentation

Make the taxa in two different sample * taxa matrices match

Description

Data in the from matrix is expanded to match the taxa occurring in the to matrix The matrices may (and usually will) have different numbers of rows. Taxa are matched using match on the column names, so column names must be set and names must match exactly in order to be matched. Taxa that are in to but not in from will be 0 in the output matrix.

Usage

matchTaxa(from, to)

Arguments

from

a nsample * ntaxa matrix

to

a nsample * ntaxa matrix

Value

a matrix with the data in the from matrix expanded or dropped so that the taxa are the same as the taxa in the to matrix (i.e., they will have the same number of columns and the same column names)


jasonelaw/RIVPACS documentation built on Sept. 27, 2022, 6:34 p.m.