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, ...)# S3 method for default
str_to(x, quote_values = FALSE, last_sep = ", or ", ...)
str_trim(x = character(), width = 80L)
str_wrap(x = character(), width = 80L)
str_to() and str_wrap() return a character string.
str_trim() returns a character vector having the same length as x.
Any R object for str_to(). A character vector otherwise.
Further arguments passed to, or from other methods.
A non-NA logical value. Should elements of x be quoted?
A non-empty and non-NA character string separating the last and penultimate elements.
A non-NA integer value. The target width for individual
elements of x. str_trim() takes 3 more characters into account for the
suffix it inserts (...).
str_to() concatenates all elements with ", ", except for the last
one. See argument last_sep.
str_wrap() preserves existing paragraph separators ("\n\n").
Other utility functions:
format_vector(),
stops(),
vapply_1l()