R/speciesgroups.R

Defines functions speciesGroups

# If species.table is defined, this function subsets X to include only the species in group

speciesGroups <- function(X, species.table = NULL, group){

  if(group == "ALL") Y = X
  else{
    inx <- which(names(species.table) == group)
    Y = X[X$SPECIES %in% species.table[,inx], ]
  }
    Y
}
dempseydanielle/marindicators documentation built on May 12, 2020, 8:12 p.m.