| clean {Read.isi} | R Documentation |
Clean is a helper function for the read.isi package. It deletes spaces at the start and the end of a single character string.
clean(x)
x |
Single character string |
Can handle single character strings only. To use on a vector of characters x, use sapply(x, FUN=clean)
Returns a character string
Rense Nieuwenhuis (contact@rensenieuwenhuis.nl)
More information on usage and background of the development can be found on www.rensenieuwenhuis.nl/r-project/my-functions/read-isi/
a <- " messy string "
clean(a)
#[1] "messy string"
b <- c(" First", "Second ", " and last ...")
sapply(b, FUN=clean)
# First Second and last ...
# "First" "Second" "and last ..."
d <- c("vfdgf'dre'3fv")
clean(d)
#[1] "vfdgf.dre.3fv"