Skip to content

Development Environments

dukevis edited this page Jun 30, 2016 · 2 revisions

Development Environments

It's all well and good to say you want to learn R, but what software are you going to use to write your R code? Here are a few options.

  • RStudio
    RStudio is certainly the go-to development environment for R. It's easy to run commands and see the results, as it is when you download R itself, but RStudio also makes it easy to search for help, install new packages, use menus to perform basic commands, view data files, and compose alternative files like R Markdown files and Shiny apps. You can either install RStudio on your own machine or you can try Duke's RStudio Docker Container.

    Within RStudio, there are several ways to write R code. One good tip is to start by creating an RStudio Project. This will make it easier to setup a version control system, as well as switch back and forth between different R projects.

    Once you have a project set up, you can either write R code directly into an R Script, or you can choose another file format that blends R code with other types of information. R Markdown is one example - with this type of file, the basic content of the document is written in Markdown language, but you can also include R code blocks that will analyze and visualize data within the document. Typically, these documents are compiled inside RStudio using a package called knitr. You can specify various outputs for the R Markdown file; that is, you may write the file in R Markdown, but then you can convert it to HTML, normal Markdown (which is a better format for Github), PDF, and even Word.

    In an upcoming version of RStudio, currently in Preview release, you will also being able to use RStudio to create R Markdown Notebooks. The notebooks allow you to intersperse text and R code, as you do with R Markdown, but the notebooks should make it a bit easier to run code in small chunks, out of order. This is presumably similar to Jupyter notebooks, discussed below.

  • Jupyter notebooks
    Jupyter notebooks, formerly ipython notebooks, are a way of writing text and code in a single document. Jupyter notebooks support many languages, including python and R. You typically compose jupyter notebooks in a browser, either by installing the Jupyter Notebook application or by using a browser-based authoring tool like Try Jupyter or Duke's Jupyter Docker Container. One additional benefit of Jupyter notebooks is that the notebook file can be dropped into a Github repository, and Github will render the notebook file without any conversion.

  • Exploratory.io
    Exploratory.io is a new tool that is still in beta. The tool uses R in the backend, but you perform everything with a user interface. First you create a project and load a dataset from your computer. The tool then creates a series of visualizations to summarize each variable. You can switch to a table view of your data, and you can also use a chart builder to create a visualization using the data. You can build addition transformations by choosing a command from a drop-down list, which includes filtering, grouping, aggregating, reshaping, joining, statistical analyses, and text mining. The changes you make can be saved as an R script.

Clone this wiki locally