| str_to | R Documentation |
str_to() converts an R object to a character string. It is a slightly
more flexible alternative to base::toString().
str_trim() wraps base::strtrim() and further adds a ... suffix to
each trimmed element.
str_wrap() wraps base::strwrap() and ensures a character string is
returned.
str_to(x, ...)
## Default S3 method:
str_to(x, quote_values = FALSE, last_sep = ", or ", ...)
str_trim(x = character(), width = 80L)
str_wrap(x = character(), width = 80L)
x |
Any R object for |
... |
Further arguments passed to, or from other methods. |
quote_values |
A non-NA logical value. Should elements of |
last_sep |
A non-empty and non-NA character string separating the last and penultimate elements. |
width |
A non-NA integer value. The target width for individual
elements of |
str_to() concatenates all elements with ", ", except for the last
one. See argument last_sep.
str_wrap() preserves existing paragraph separators ("\n\n").
str_to() and str_wrap() return a character string.
str_trim() returns a character vector having the same length as x.
Other utility functions:
format_vector(),
stops(),
vapply_1l()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.