convertCase | R Documentation |
Convert a character vector, all character variables in a data.frame
or selected variables in a GADSdat
to
upper ("uppper"
), lower ("lower"
), or first letter upper and everything else lower case ("upperFirst"
).
convertCase(x, case = c("lower", "upper", "upperFirst"), ...)
## S3 method for class 'GADSdat'
convertCase(x, case = c("lower", "upper", "upperFirst"), vars, ...)
x |
A character vector, |
case |
Character vector of length 1. What case should the strings be converted to? Available options are
|
... |
further arguments passed to or from other methods. |
vars |
Character vector. What variables in the |
Returns the converted object.
convertCase(GADSdat)
: convert case for GADSdats
# for character
convertCase(c("Hi", "HEllo", "greaT"), case = "upperFirst")
# for GADSdat
input_g <- import_DF(data.frame(v1 = 1:3, v2 = c("Hi", "HEllo", "greaT"),
stringsAsFactors = FALSE))
convertCase(input_g, case = "upperFirst", vars = "v2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.