Description Usage Arguments See Also Examples
Relabel categories, possibly regrouping them
1 |
x |
vector of categories (usually the "Valid" column of the data.frame produced by |
labels |
a two columns data.frame or matrix with the old names in the first column and the new name in the second column; if some new names are equal, this effectively regroups the categories |
1 2 3 4 5 6 7 8 9 10 | x <- c("append_fritill", "append_housing", "crust_copepods_calanus", "crust_copepods_euchaeta", "crust_larvae", "append_fritill")
# change labels
labels <- data.frame(old=c("append_fritill", "append_housing"), new=c("larvacean_fritill", "larvacean_housing"))
relabel(x, labels=labels)
# combine some groups (see regroup_taxa for a more generic way of doing this)
grouping <- data.frame(old=c("append_fritill", "append_housing"), new="appendicularians")
print(grouping)
relabel(x, labels=grouping)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.