collectors: Collector based cleaning

collectorsR Documentation

Collector based cleaning

Description

Collector based cleaning

Usage

coll_clean(x, collector = NULL)

Arguments

x

(data.frame) A data.frame

collector

(character) Collector field to use. 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

Details

Explanation of the functions:

  • coll_clean - Standardize collector names

Value

Returns a data.frame, with attributes

Examples

# df <- data.frame(
#   coll = c('K.F.P. Martius', 'C. F. P. Martius', 'C. F. P. von Martius'),
#   species = 'Poa annua',
#   lat = 1:3,
#   lon = 4:6,
#  stringsAsFactors = FALSE
# )

# Standardize names
# NROW(df)
# df <- dframe(df) %>% coll_clean()
# NROW(df)
# attr(df, "coll_clean")

ropenscilabs/scrubr documentation built on Sept. 12, 2022, 4:10 p.m.