clean_strings | R Documentation |
Multiple, leading and trailing white spaces as well as wrong encodings may
cause serious problems in information dealing with taxonomic names.
The function clean_strings
get rid of them.
clean_strings(x, ...)
## S4 method for signature 'character'
clean_strings(x, from = "utf8", to = "utf8", ...)
## S4 method for signature 'factor'
clean_strings(x, from = "utf8", to = "utf8", ...)
## S4 method for signature 'data.frame'
clean_strings(x, from = "utf8", to = "utf8", ...)
x |
Object to be cleaned. |
... |
Further arguments passed among methods (not yet in use). |
from , to |
Arguments passed to |
This function automatically deletes leading, trailing and multiple white
spaces, either in strings (method character
), levels (method
factor
or in single columns (method data.frame
).
The same as input x
.
Miguel Alvarez.
## Leading, trailing and multiple spaces
clean_strings(" Cyperus papyrus L. ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.