Learn R Programming

rfishnet2 (version 0.2.0)

get_species: Get unique species in a given genus in dataframe.

Description

get_species returns all species name that correspond to genus name input in a FishNet2 dataframe.

Usage

get_species(df, genus)

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

genus

Genus of species

Value

Vector of unique species values or character(0) if empty

Details

This is a function to get the species name of a given genus name. Names are found using the 'ScientificName' column in a FishNet2 dataframe. If "value is only one word, no species name is returned.

Examples

Run this code
# NOT RUN {
get_species(ictaluridae, "Ameirus")
get_species(ictaluridae, "Noturus")
get_species(louisiana, "Scaphirhynchus")
# }

Run the code above in your browser using DataLab