Description Usage Arguments Value Author(s) Examples
These functions allow us to represent R objects which represent various types of R code, functions and methods. These also simplify indenting the code.
1 |
... |
character strings giving the text for the code |
.txt |
an alternative way to provide the strings for the code |
indent |
the string to prefix the text, i.e. indent. |
class |
the type of object. This allows us to use the same function to construct different types of objects |
An instance of class class
containing the code
as a single string concatenated togther with a new line
character (\n).
Duncan Temple Lang
1 | RCode("if(is.null(x))", " stop('x is null')", "x[[2]]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.