Split a larger line into mulitple lines by wrapping words with inserted line feeds. Primarily for internal use in text processing of knitr
output. Not usually referenced by the user.
xW(x, w=90, indent=5)
The character string to split into separate lines.
Maximum width of each line.
Amount of spaces to indent lines after the first line.
Input is a sentence. Output is the sentence word wrapped into multiple lines, each line up to the maximum width.
# NOT RUN {
xW("The quick brown fox jumped over the lazy dog's back.", w=30)
# }
Run the code above in your browser using DataLab