string_repr | R Documentation |
This is inspired by the python function repr
and produces a short
string representation of any R object that is suitable for logging and error
messages. It is a generic so you can implement methods for custom S3 objects.
string_repr(x, width = 32, ...) ## S3 method for class ''function'' string_repr(x, width = 32L, ...) ## S3 method for class 'data.frame' string_repr(x, width = 32L, ...) ## S3 method for class 'matrix' string_repr(x, width = 32L, ...) ## Default S3 method: string_repr(x, width = 32L, ...)
x |
Any R object. |
width |
a scalar integer |
... |
passed on to methods |
a scalar
character
string_repr(iris) string_repr(LETTERS) string_repr(LETTERS, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.