R/findSpecies.R

findSpecies <- function(string){
# First find all the cells that contain the string
  cellsOI <- apply(species, 2, function(x) grepl(string, x, ignore.case=TRUE))
# Now determine all the rows that of interest
  rowsOI <- apply(cellsOI,1,sum)
# Display the rows of interest
  species[rowsOI>0,]
}

Try the hoardeR package in your browser

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

hoardeR documentation built on May 2, 2019, 5:15 a.m.