clean: Clean character vector

Description Usage Arguments Value Examples

View source: R/clean.R

Description

Clean character vector automatically with user feedback

Usage

1
clean(s, ask_user = TRUE, fingerprint_fun = fingerprint)

Arguments

s

chacacter vector

ask_user

Logical value in order to ask user her opinoin or automatically clean

fingerprint_fun

name of function to be used for identifying string keys This should receive a char vector and returns same char vector of same lengt

Value

chacacter vector of clean/unified strings

Examples

1
2
3
4
not_clean <- c("school","School","school","School",
"School ","SCHOOL","School", "Class A","Class A", "A-CLASS", "A CLASS")
clean(s = not_clean, ask_user = FALSE)
clean(s = not_clean, ask_user = FALSE, fingerprint_fun = fingerprint_alphabetical_per_word)

bhakyuz/clnr documentation built on Nov. 4, 2019, 7:16 a.m.