library(plotly)
## Loading required package: ggplot2
## 
## Howdy, chriddyp!
## 
## Attaching package: 'plotly'
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## The following object is masked from 'package:graphics':
## 
##     layout
p <- plot_ly(midwest, x = percollege, color = state, type = "box")
class(p)
## [1] "plotly"     "data.frame"
p