merge_phen_and_abun: Merge phenotype data with relative abundances of blocks

Description Usage Arguments Details Value Author(s)

View source: R/merge_phen_and_abun.r

Description

Merge two data frames containing plant phenotypic data and bacterial relative abundances

Usage

1
2
merge_phen_and_abun(Phen, abun, columns, varnames = c("Bacteria",
  "Experiment", "StartP", "EndP"))

Arguments

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.

Details

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.

Value

A data.frame where phenotypes and abundances are matched.

Author(s)

Sur Herrera Paredes


surh/wheelP documentation built on Feb. 21, 2018, 7:40 p.m.