sentenceify | R Documentation |
Converts the input to a character vector and ensures it starts with an upper case letter and ends with the specified punctuation mark.
sentenceify(x, punctuation_mark = ".")
x |
Input to be converted to sentence case, typically a character vector. |
punctuation_mark |
Punctuation mark to be appended to |
Note that this function doesn't alter any characters in x
other than the first and the last one.
A character vector of the same length as x
.
stringr::str_to_sentence()
to convert a character vector to all lowercase except for the first character. Note that this also includes lowercasing proper nouns, abbreviations etc.
snakecase::to_sentence_case()
that builds upon stringr::str_to_sentence()
but offers additional options to finetune the conversion. Note that
abbreviations
have to be manually specified in order to be preserved in upper case.
Other string functions:
as_chr()
,
as_comment_str()
,
as_line_feed_chr()
,
as_str()
,
capitalize_first()
,
dsv_colnames()
,
enum_str()
,
escape_lf()
,
fuse_regex()
,
prettify_nr()
,
wrap_chr()
pal::sentenceify("no verb, no sentence")
# punctuation mark won't be duplicated if already existing
pal::sentenceify(c("I've made my point",
"good point."))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.