Micah P. Dombrowski / Jul 05 2018

Plotting in R

# ggplotly() complains if ggplot2 isn't github-fresh
devtools::install_github('hadley/ggplot2')
# Temporary workarounds for Issue #1974
dev.off(which="pdf")
dev.off(which="png")
pdf(NULL)
png("/tmp/foo.png")
p <- ggplot(mpg, aes(cyl, hwy))

typeof(p)
class(p)
sapply(p, class)
ggplotly(p + geom_jitter())
typeof(p)
class(p)
sapply(p, class)
ggplotly(p)