R/species.R

Defines functions species

Documented in species

species <- function(x ){
   # remove brackets and single quotes
   x <- gsub("\\[|\\]|'", "", x)
   ## remove Candidate species
   x <- gsub("candidate |Candidatus ", "", x)
   y  <- strsplit(x, "\\s+")
   ge <- sapply(y, "[", 1)
   sp <- sapply(y, "[", 2)
   paste(ge, sp)
}

Try the genomes package in your browser

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

genomes documentation built on Nov. 8, 2020, 7:45 p.m.