relation2header: Insert variables from relations into header
Description
Information associated to categories listed in slot relations can be
inserted to slot header for further statistical comparisons.
Usage
relation2header(vegtable, ...)
# S3 method for vegtable
relation2header(vegtable, relation, vars, ...)
Value
A vegtable object.
Arguments
vegtable
An vegtable object.
...
Further arguments passed among methods
relation
A character value indicating the relation to be used for
inserting new variables in slot header.
vars
A selection of variables from the relation to be inserted in
header. This function will check the existence of the variables in the
respective relation and retrieve an error if none is matching the names.
If missing in the arguments, all variables of the respective relation
will be inserted.
## Insert publication year of the source into headerveg <- relation2header(Kenya_veg, "REFERENCE", "YEAR")
## Show the frequency of plots per publication yearsummary(as.factor(veg$YEAR))