Getting Started with Plotly for R
As of version 2.0 (November 17, 2015), graphs created with the
plotly R package are rendered locally through the
Download from CRAN
install.package() function to install the
plotly R package from [CRAN](https://cran.r-project.org/!
Download from GitHub
Alternatively, you can install the latest development version of
plotly from GitHub via the
devtools R package:
RStudio users should ensure that they are using the latest RStudio release in order to ensure compatibility with the
htmlwidgets R package.
By default, the
plotly R package runs locally in your web browser or in the
library(plotly) p <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box") p
Simply printing the plot object will render the chart locally in your web browser or in the
Graphs created with the
plotly R package are interactive!
Click on legend entries to hide/show traces, click-and-drag on the chart to zoom, double-click to autoscale, shift-and-drag to pan.