powered by
Format text
format_text(x, sep = ", ", last = " and ", width = NULL)
Character vector.
Separator.
Last separator.
Positive integer giving the target column for wrapping lines in the output. Can be "auto".
A formatted character vector.
# NOT RUN { format_text(c("A", "B", "C")) x <- paste(rep("a very long string", 50), collapse = " ") cat(format_text(x, width = 50)) # }
Run the code above in your browser using DataLab