Description Usage Arguments Details Value Author(s)
View source: R/merge_phen_and_abun.r
Merge two data frames containing plant phenotypic data and bacterial relative abundances
1 2 | merge_phen_and_abun(Phen, abun, columns, varnames = c("Bacteria",
"Experiment", "StartP", "EndP"))
|
Phen |
A data frame with phenotypic information |
abun |
A data frame with abundance information |
varnames |
Vector of charachter strings indicating which variables to use to combine datasets. Rows where the exact same combination of values for all variables occur are considered identical. |
The function takes a list of variables that when combined must uniqueley identify each row of both data frames. Those variable smust exist in both data frames.
It then constructs an index that it uses to match the columns. Abundance data can be missing for some phenotypic observations, in which case it will be replaced by zero.
A data.frame where phenotypes and abundances are matched.
Sur Herrera Paredes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.