Description Usage Arguments Whitespace
This is an ANSI-aware copy of base::strwrap
.
1 2 | ansi_strwrap(x, width = 0.9 * getOption("width"), indent = 0, exdent = 0,
prefix = "", simplify = TRUE, initial = prefix)
|
x: |
a character vector, or an object which can be converted to a character vector by ‘as.character’. |
width: |
a positive integer giving the target column for wrapping lines in the output. |
indent: |
a non-negative integer giving the indentation of the first line in a paragraph. |
exdent: |
a non-negative integer specifying the indentation of subsequent lines in paragraphs. |
prefix: |
a character string to be used as prefix for each line except the first, for which ‘initial’ is used. |
initial: |
a character string to be used as prefix for the first line |
simplify: |
a logical. If ‘TRUE’, the result is a single
character vector of line text; otherwise, it is a list of the same length
as |
Tabs, new lines, and form feeds are treated as single spaces, space sequences are treated as single spaces except that those following end of sentence markers (i.e. ‘.’, ‘?’, or ‘!’ will be treated as two spaces if they are two spaces or longer. All other whitespace, including but not limited to vertical tabs, carriage returns, etc., are treated as if they occupy one screen character.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.