run <- FALSE root_dir <- paste(rep("../", 1), collapse = "") knitr::opts_chunk$set(comment = "#>", collapse = TRUE) knitr::opts_knit$set(root.dir = root_dir)
createInstance(of = "test_class") createInstance(of = "test_class", with = letters[1:3]) createInstance(of = "test_class", with = letters[1:3]) createInstance(of = "test_class", with = letters[1:3], attributes = list(attr_1 = TRUE, attr_2 = "yep!")) createInstance(of = "test_class", with = letters[1:3], attributes = list(my_attrs = list(attr_1 = TRUE, attr_2 = "yep!")))
foo <- function(x, ...) { UseMethod("foo", x) } foo.test_class <- function(x, ...) { print("hello world") }
x <- createInstance("test_class") foo(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.