| nstring | R Documentation |
neat representation of string
nstring(
text,
case = NULL,
remove_specials = FALSE,
keep_chars = "",
ascii_only = FALSE,
string = NULL,
whitelist_specials = NULL,
en_only = NULL
)
text |
a string / character |
case |
a string, It specifies how the string should be formatted. Current options are 'lower', 'upper', 'title', 'start' and 'initcap'. |
remove_specials |
a Boolean. If TRUE, special characters are removed from the string. |
keep_chars |
a vector of characters that are kept even if remove_specials is TRUE. |
ascii_only |
a Boolean. If TRUE, only ASCII characters are kept. |
string |
Deprecated. Use 'text' instead. |
whitelist_specials |
Deprecated. Use 'keep_chars' instead. |
en_only |
Deprecated. Use 'ascii_only' instead. |
White space cleaned and optionally formatted by case conversion and removal of special characters of the input string.
nstring(" All MOdels are wrong. some ARE useful!!! ",
case = "title",
remove_specials = TRUE
)
nstring("all Models are Wrong some are Useful",
case = "start",
remove_specials = TRUE
)
nstring("variable_123!!", remove_specials = TRUE, keep_chars = c("_"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.