View source: R/convertToShortString.R
| convertToShortString | R Documentation |
Atomics: If of length 0 or 1, they are basically printed as they are.
Numerics are formated with num.format.
If of length greater than 1, they are collapsed witd “,” and clipped.
so they do not become excessively long.
Expressions will be converted to plain text.
All others: Currently, only their class is simply printed like “<data.frame>”.
Lists: The mechanism above is applied (non-recursively) to their elements. The result looks like this: “a=1, <unamed>=2, b=<data.frame>, c=<list>”.
convertToShortString(x, num.format = "%.4g", clip.len = 15L)
x |
[any] |
num.format |
[ |
clip.len |
[ |
[character(1)].
convertToShortString(list(a = 1, b = NULL, "foo", c = 1:10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.