taxonomy: Taxonomy based cleaning

Description Usage Arguments Value Examples

Description

Taxonomy based cleaning

Usage

1

Arguments

x

(data.frame) A data.frame1

name

(character) Taxonomic name field Optional. See Details.

drop

(logical) Drop bad data points or not. Either way, we parse out bade data points as an attribute you can access. Default: TRUE

Value

Returns a data.frame, with attributes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if (requireNamespace("rgbif", quietly = TRUE) && interactive()) {
   library("rgbif")
   res <- rgbif::occ_data(limit = 200)$data
} else {
   res <- sample_data_3
}

# Remove records where names don't have genus + epithet
## so removes those with only genus and those with no name (NA or NULL)
NROW(res)
df <- dframe(res) %>% tax_no_epithet(name = "name")
NROW(df)
attr(df, "name_var")
attr(df, "tax_no_epithet")

scrubr documentation built on June 12, 2021, 9:06 a.m.