veg_aggregate | R Documentation |
Compute summarizing tables from vegtable objects.
This function works in a similar way as crosstable()
.
veg_aggregate(object, data, FUN, ...)
## S4 method for signature 'formula,vegtable,function'
veg_aggregate(object, data, FUN, use_nas = TRUE, ...)
object |
A formula indicating the variables used for the summary.
As in |
data |
Either a data frame or an object of class vegtable. |
FUN |
Function used to aggregate values. |
... |
Further arguments passed to the function |
use_nas |
Logical value indicating whether NA's should be included in categorical variables or not. |
An object of class data.frame.
Miguel Alvarez kamapu78@gmail.com
aggregate()
## Transform cover to percentage cover
veg <- cover_trans(x = Kenya_veg, to = "cover")
## Frequency of taxa per publication
atab <- veg_aggregate(object = cover ~ AcceptedName + REFERENCE, data = veg, FUN = length)
head(atab)
## Life form proportions per plot
atab <- veg_aggregate(object = cover ~ lf_behn_2018 + ReleveID, data = veg, FUN = sum)
head(atab)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.