Append covariate data as a column within a table
Source:R/covariate.functions.R
append.covariate.Rdappend.covariate appends a data frame of covariates as a new column in a data frame
of trait data.
In the event a trait has several covariates available, the first one found
(i.e. lowest row number) will take precedence
Arguments
- data
trait dataframe that will be appended to.
- column.name
name of the covariate as it will appear in the appended column
- covariates.data
one or more tables of covariate data, ordered by the precedence they will assume in the event a trait has covariates across multiple tables. All tables must contain an 'id' and 'level' column, at minimum.