collectors: Collector based cleaning

Description Usage Arguments Details Value Examples

Description

Collector based cleaning

Usage

1
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:

Value

Returns a data.frame, with attributes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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")

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