filter_by_species {forcis} | R Documentation |
Filter FORCIS data by species
Description
Filters FORCIS data by a species list.
Usage
filter_by_species(data, species)
Arguments
data |
a |
species |
a |
Value
A tibble
containing a subset of data
.
Examples
# Import example dataset ----
file_name <- system.file(file.path("extdata", "FORCIS_net_sample.csv"),
package = "forcis")
net_data <- read.csv(file_name)
# Select a taxonomy ----
net_data <- select_taxonomy(net_data, taxonomy = "VT")
# Select only required columns (and taxa) ----
net_data <- select_forcis_columns(net_data)
# Dimensions of the data.frame ----
dim(net_data)
# Get species names ----
get_species_names(net_data)
# Select records for three species ----
net_data_sub <- filter_by_species(data = net_data,
species = c("g_inflata_VT",
"g_elongatus_VT",
"g_glutinata_VT"))
# Dimensions of the data.frame ----
dim(net_data_sub)
# Get species names ----
get_species_names(net_data_sub)
[Package forcis version 1.0.1 Index]