# NOT RUN {
if(interactive()) {
p <- l_ggplot(mpg, aes(displ, cty)) +
geom_point() +
facet_grid(rows = vars(drv))
# p is a `lggplot` object, `print.lggplot(p)` is called automatically.
# Then, the `lggplot` object will be transformed to a `loon` widget
p
}
# }
# NOT RUN {
# get widgets from current path
# suppose the path of `p` is '.l0.ggplot'
q <- l_getFromPath('.l0.ggplot')
# q is a `loon` widget
q
# }
Run the code above in your browser using DataLab