RcssWatch | R Documentation |
This is a macro script that loads R code and a default Rcss style, and then executes a function. This process is repeated indefinitely.
RcssWatch(f, files = NULL, ...)
f |
function or character of function name, executed at each iteration |
files |
character, paths to R and Rcss files |
... |
other arguments, passed to function f |
# Note: the examples below draw a charat once and exit.
# To enable quick re-drawing, RcssWatch must be provided with file paths
# draw and redraw a bar plot
RcssWatch(plot, x=1:4, y=1:4)
# alternative syntax, using a function name as a string
custom.barplot <- function(x=1:4, main="") { barplot(x, main=main) }
RcssWatch("custom.barplot", main="Custom")
# for more interesting behavior, specify a files with styles and R source
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.