Description Usage Arguments Details Value Author(s) Examples
View source: R/site_names_correction.R
Homogenises site names The function takes a strings of heterogeneous site names, corrects misprints and homogenises spacing, capital letters and names.
1 2 3 4 5 6 | site_names_correction(
site_vector = NA,
add_site_category_to_acronyms = FALSE,
site_category = "Site",
convert_to_ascii = FALSE
)
|
site_vector |
a character vector containing site names to correct |
add_site_category_to_acronyms |
Should a common name specified in |
site_category |
Word added to accronyms if |
convert_to_ascii |
Change the encoding of the vector to ASCII which replaces all special characters to their closest ASCII equivalent: accentuated characters such as Áêãçoàúü are converted to their basic equivalent Aeacoauu |
details
A character vector of same length as site_vector
Alban Sagouis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | extend_genus_names(c("Bufo bufo", "B. bufo", "Buteo buteo", "B. buteo"))
exmpl <- c('s2','1','site.3','forestPrime','forest,border','forest border','(border)')
data.frame(exmpl,
corrected = site_names_correction(site_vector = exmpl,
add_site_category_to_acronyms = TRUE)
)
exmpl corrected
1 s2 Site s2
2 1 Site 1
3 site.3 Site.3
4 forestPrime Forest Prime
5 forest,border Forest,border
6 forest border Forest border
7 (border) (border)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.