1. library(rCharts)
  2. p2 <- nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'scatterChart')
  3. p2$xAxis(axisLabel = 'Weight')
  4. p2$chart(size = '#! function(d){return d.gear} !#')
  5. p2$chart(color = c('red', 'green', 'blue'))
  6. p2