wrap_string | R Documentation |
This function takes an input string and wraps it to lines of a specified width, breaking the string at word boundaries.
wrap_string(input_string, width = 80)
input_string |
The input string to be wrapped. |
width |
The maximum width of each line. Default is 80 characters. |
A character vector where each element represents a line of the wrapped string.
input_string <- "This is a long string that needs to be wrapped to fit within
a specified width."
wrapped_lines <- wrap_string(input_string, width = 30)
cat(wrapped_lines, sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.