Structure demo code into an R package.