tocamel: CamelCase

Description Usage Arguments Value Examples

Description

Convert character vector to camelcase - capitalise first letter of each word.

Usage

1
tocamel(x, delim = "[^[:alnum:]]", upper = FALSE, sep = "", ...)

Arguments

x

a character vector to be converted to camelcase

delim

a string containing regular expression word delimiter

upper

a logical value indicating if the first letter of the first word should be capitalised (defaults to FALSE)

sep

a string to separate words

...

additional arguments to be passed to strsplit

Value

a character vector with strings put in camelcase

Examples

1
2
3
4
5
6
7
8
tocamel("foo.bar")
    ## [1] "fooBar"

    tocamel("foo.bar", upper = TRUE)
    ## [1] "FooBar"

    tocamel(c("foobar", "foo.bar", "camel_case", "a.b.c.d"))
    ## [1] "foobar"    "fooBar"    "camelCase" "aBCD"

rapportools documentation built on May 1, 2019, 8:18 p.m.