wt_tidy_species: Filter the species list to the groups of interest from...

View source: R/convenience-functions.R

wt_tidy_speciesR Documentation

Filter the species list to the groups of interest from wt_get_species

Description

This function filters the species provided in WildTrax reports to only the groups of interest. The groups available for filtering are mammal, bird, amphibian, abiotic, insect, and unknown. Zero-filling functionality is available to ensure all surveys are retained in the dataset if no observations of the group of interest are available.

Usage

wt_tidy_species(
  data,
  remove = c("mammal", "amphibian", "abiotic", "insect", "bird", "unknown"),
  zerofill = TRUE
)

Arguments

data

WildTrax main report or tag report from the wt_download_report() function.

remove

Character; groups to filter from the report ("mammal", "bird", "amphibian", "abiotic", "insect", "unknown"). Defaults to retaining bird group only.

zerofill

Logical; indicates if zerofilling should be completed. If TRUE, unique surveys with no observations after filtering are added to the dataset with "NONE" as the value for species_code and/or species_common_name. If FALSE, only surveys with observations of the retained groups are returned. Default is TRUE.

Value

A dataframe identical to input with observations of the specified groups removed.

Examples

## Not run: 
dat.tmtt <- wt_tidy_species(dat,
remove=c("mammal", "amphibian", "abiotic", "insect", "unknown"),
zerofill = TRUE)

## End(Not run)

mabecker89/wildRtrax documentation built on Feb. 5, 2024, 8:50 a.m.