View source: R/create_groups.R
create_groups | R Documentation |
Assign species to a priori groupings.
create_groups(dat.obj, species.groups = NULL, abbrev = FALSE)
dat.obj |
Input dataset. Must be an object of class |
species.groups |
List indicating which species should be grouped. These can be given using any combination of scientific name, common name, or unique identifier, as defined in |
abbrev |
Logical. If |
A list object of class brsdata.grp
.
Phil J. Bouchet
undo_groups
summary.brsdata
## Not run:
library(espresso)
# Import the example data, excluding Risso's dolphins and minke whales
mydat <- read_data(file = NULL, exclude.species = c("gg", "ba"))
summary(mydat)
# Group all beaked whales together
mydat.grouped <- create_groups(mydat,
species.groups = list(c("Md", "Cuvier's beaked whale",
"Hyperoodon ampullatus")))
Examine the resulting grouping
summary(mydat.grouped)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.