Skip to content

Instantly share code, notes, and snippets.

@rcquan
Created November 22, 2014 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcquan/5aa0ab1475fb57c2d36d to your computer and use it in GitHub Desktop.
Save rcquan/5aa0ab1475fb57c2d36d to your computer and use it in GitHub Desktop.
library(rCharts)
library(zoo)
# Data transformations
names(medMis_plot) <- c("Month", "MedicalMisconductCount")
medMis_plot$Month <- as.yearmon(medMis_plot$Month)
medMis_plot <- transform(medMis_plot, Month = as.character(Month))
# Morris Line Plot
m1 <- mPlot(x = "Month", y = colnames(medMis_plot)[2], data = medMis_plot, type = "Line")
m1$set(pointSize = 0, lineWidth = 1, parseTime = FALSE)
m1$set(labels = list("MedicalMisconductCount"))
m1$print("chart1", include_assets = TRUE, cdn = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment