Category: R

Interactive visualization of survival curves with Shiny

We have a growing interest in using our favorite tools (R and Mathematica) to build web interfaces to interactively explore and visualize data. Our last 5 posts have involved interactive tools, namely Mathematica’s computable document format and R’s new Shiny package.

Shiny = Happy People

The people behind the wonderful RStudio, which I gushed about in a previous post, have developed a new package, Shiny, that makes it easy to develop interactive web applications with R.

Good programming practices in R

I write sloppy R scripts. It is a byproduct of working with a high-level language that allows you to quickly write code on the fly (see this post for a nice description of the problem in Python code) and the result of my limited formal training in computer programming.

RStudio is RStupendous

I am a sucker for beautiful applications. The latest R-related application to catch my eye is RStudio. RStudio™ is a free and open source integrated development environment (IDE) for R.

Using paste to read and write multiple files in R

This post is a quick tip on how to use the paste1 function to read and write multiple files. First, let’s create some data. dataset = data.frame(expand.grid(Trt=c(rep("Low",10),rep("High",10)), Sex=c(rep("Male",10),rep("Female",10))), Response=rnorm(400)) The next step is not necessary, but makes the subsequent code more readable.

Transformation of axes in R

As a general rule, you should not transform your data to try to fit a linear model. But proportions can be tricky. If the proportion data do not arise from a binomial process (e.

Spacing of multi-panel figures in R

In a previous post, I showed how to keep text and symbols at the same size across figures that have different numbers of panels. The figures in that post were ugly because they used the default panel spacing associated with the mfrow argument of the par function.