Learn R Programming

ambiorix (version 2.2.0)

robj: R Object

Description

Treats a data element rendered in a response (res$render) as a data object and ultimately uses dput().

Usage

robj(obj)

Value

Object of class "robj".

Arguments

obj

R object to treat.

Details

For instance in a template, x <- [% var %] will not work with res$render(data=list(var = "hello")) because this will be replace like x <- hello (missing quote): breaking the template. Using robj one would obtain x <- "hello".

Examples

Run this code
robj(1:10)

Run the code above in your browser using DataLab