This time our meetup will feature three high-profile members of the R community. We're looking forward to meeting you all!
• Dirk Eddelbuettel, author and maintainer of the Rcpp package and many others, and an early Debian contributor
• J.J. Allaire, Founder & CEO of RStudio
• Joe Cheng, Software Engineer at RStudio
J.J: Allaire: Packrat - A Dependency Management System for R
Dependency management in R is difficult. Different R projects can have different dependencies, and can often depend on different versions of the same R packages. The suite of R packages served by CRAN and BioConductor is constantly evolving and growing, and while R core and package authors make large efforts to maintain backwards compatibility, it is not guaranteed as R and its packages evolve.
As a result, packrat helps the user by isolating dependencies within a project, ensuring that they do not conflict with package requirements in other projects. In addition, package sources are recorded, so that packages can be easily upgraded and rolled back, using the archives available on CRAN and BioConductor, or to local package sources packaged alongside the project. Furthermore, users collaborating on a project can use packrat to ensure that their R environments are compatible, hence avoiding compatibility problems in collaborative projects.
packrat helps solve the following problems:
• Local Dependency Management: Because each packrat project uses its own private library, depen- dencies are effectively isolated from other projects, and so versioning conflicts can be controlled and avoided. A user can bootstrap a project to infer and set up the local library the project requires, and with later modifications to this local library, the user can snapshot and save the current library state, or restore and roll back to the last snapshotted state.
• Portability: packrat makes it easy to bundle a project for sharing. A bundled project can easily be unbundled to restore the same R environment that was originally used in the project, even across different platforms.
• Reproducibility: packrat records the exact package versions a project depends on, and ensures those exact versions are the ones that get installed wherever the packrat project is used.
Replication is the ultimate standard by which scientific claims are judged (Peng 2011)
In this talk, we will outline a number of common usage scenarios with packrat, and demonstrate how it canbe used to control and manage dependencies within your project.
Ooms, Jeroen. 2013. “Possible Directions for Improving Dependency Versioning in R.” CoRR abs/1303.2140.
Peng, Roger D. 2011. “Reproducible Research in Computational Science.” Science 334 (6060): 1226– 27. doi:[masked]/science.1213847. http://www.sciencemag.org/content/334/6060/1226. abstract.
Dirk Eddelbuettel, An Example-Driven Hands-on Introduction to Rcpp
The focus of the talk will be on introducing Rcpp in order to extend R, as well as to accelerate execution of simple C++ functions. It aims to enable R users to deploy the Rcpp package for both one-off tasks and experiments implemented in C++ (and done most easily using cppFunction() or sourceCpp), as well as simple packages using C++ to extend and/or accelerate R programming with data (using RStudio for the package building steps).
We start by getting first things right: how to compile simple C++ functions containing just one or two lines. This will at the same time assert that the working environment is set up correctly and provide familiarity with the toolchains.
We then cover simple package building as packages are the standard unit of code organisation, deployment and distribution within the R world. This process is much aided by both a helpful environment such as RStudio as well as by helper functions such as Rcpp.package.skeleton() (and also called by RStudio). Time permitting, we may study a few recent, simple, small-enough yet complete and meaningful example from the Rcpp Gallery website .
Joe Cheng: Introduction to Shiny
R has long been an excellent platform for writing reports, thanks to tools like Sweave (and more recently,knitr and rmarkdown). But these tools have focused primarily on generating static artifacts, like PDF andHTML documents. As the reader of a report, it’s impossible to tweak any of the parameters used, or provideyour own data to be subjected to the same analysis, without going back to the report’s author and askingthem to modify and recompile the report.
In contrast, the shiny package makes it easy for R users to create interactive artifacts, in the form of webapplications. Shiny has built-in functions that:
-Create input widgets like sliders, numeric inputs, and dropdowns
- Include output widgets for graphical, textual, and tabular data
- Lay out these widgets and any other content using grids, tabs, navigation lists
This talk will illustrate just how easy it is to write Shiny applications, then show some of the interestingways we have been improving and extending Shiny.