I could have used stringr::str_wrap
but that function does
not consider if the input string already has breaks
1 | wrap_long_sentence(vec, index_sepa = ",", break_sepa = "\n", thres = 8)
|
vec |
a character vector, e.g. |
index_sepa |
where may a line break be inserted |
break_sepa |
the separator for line break, i.e. '\n' for most
applications except |
thres |
how many letters maximum in each line |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.