nstring | R Documentation |
neat representation of string
nstring(
string,
case = NULL,
remove.specials = FALSE,
whitelist.specials = "",
en.only = FALSE
)
string |
a string / character |
case |
an optional parameter to convert the string variable to specific case. By default the case of the string is kept as it is. The available case conversions are lower, upper, title, start and initcap case. |
remove.specials |
an optional boolean. To remove special characters including any punctuation to be removed from the string, set this to TRUE. |
whitelist.specials |
an optional vector of strings. If any special characters to be retained while remove.specials is set to TRUE. See examples below. |
en.only |
an optional parameter taking boolean values, if set to TRUE, only english alphabets (and numbers) are kept in the string. Non english characters are removed. |
White space cleaned and optionally formatted by case conversion and removal of special characters of the input string.
Refer to https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage for more information about the different cases of text/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, whitelist.specials = c('_'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.