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
}

Try the marindicators package in your browser

Any scripts or data that you put into this service are public.

marindicators documentation built on Nov. 12, 2019, 5:07 p.m.