I wrote this as an excercise in creating a R package. Hopefully somebody will find it useful.
Install the CRAN package in R like this:
Install the Swirl tutorial in R like this:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.