Here we'll be using the new robencla package to train a classifier and do some experiments.
devtools::install_github('gibbsdavidl/robencla')
OK then
library(robencla)
Type any R code in the chunk, for example:
mycars <- within(mtcars, { cyl <- ordered(cyl) }) mycars
Now, click the Run button on the chunk toolbar to execute the chunk code. The result should be placed under the chunk. Click the Knit and Open Document to build and preview an output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.