Created
April 10, 2017 22:06
-
-
Save hafen/573da5da4b384ebde76012ab06420943 to your computer and use it in GitHub Desktop.
writing trelliscopejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(trelliscopejs) | |
library(ggplot2) | |
qplot(cty, hwy, data = mpg) + | |
geom_abline(alpha = 0.5) + | |
xlim(7, 37) + ylim(9, 47) + theme_bw() + | |
facet_trelliscope(~ manufacturer + class, nrow = 2, ncol = 4, path = "/tmp/myplot") | |
# this places a self-contained trellisopejs display in the directory /tmp/myplot | |
list.files("/tmp/myplot") | |
browseURL("/tmp/myplot/index.html") | |
# this directory can be zipped up and sent to someone | |
# or you can place this directory in a github pages repository to serve it on the web through github pages | |
# or you can simply place this directory on any web server to serve it on the web | |
# (it's pure html/js so any web server should be able to handle it without any other technology set up) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment