14 October 2013

Interactive 3D in Shiny (shinyRGL)

The rgl package has been used to produce rich, interactive 3D graphics within R using the OpenGL framework for some time. The rgl authors also added the ability to export to WebGL, allowing R authors to produce interactive 3D graphics that were accessible from within any modern web browser.

Read more
29 June 2013

Reproducing R: Scripts, Documents, and Packages

I’m sharing the slides from the talk I’ll be giving at the Dallas R Users Group on creating R packages (and other techniques for reproducing R). I’ll introduce R scripts, reproducible R documents, and R packages. We’ll use the knitr, devtools, and roxygen2 packages in the examples.

Read more
19 June 2013

Dallas R Users: Creating R Packages this Saturday, 6/29

I’ll be presenting at the Dallas R Users Group next Saturday at 10:00AM at the University of Dallas on how to reproduce your R code. We’ll review how to use R scripts, how to embed R code in reproducible documents, and then introduce how to create your own R packages based on your R code. At the end of the afternoon, you’ll be familiar with the entire process of creating an R package to be shared on a repository like CRAN or Bioconductor. No programming background is required – the entire process will be done within RStudio and the R code we’ll be using will be very basic.

Read more
08 April 2013

Package-Wide Variables/Cache in R Packages

It’s often beneficial to have a variable shared between all the functions in an R package. One obvious example would be the maintenance of a package-wide cache for all of your functions. I’ve encountered this situation multiple times and always forget at least one important step in the process, so I thought I’d document it here for myself and anyone else who might encounter this issue. I setup a simple project on GitHub to demonstrate the various attempts you may take to solve the problem and, ultimately, a solution: https://github.com/trestletech/RCache. The rest of this article will presume some knowledge of authoring R packages. If that’s not you, check out RStudio’s guide to authoring R packages.

Read more