Description Usage Arguments Details Examples
Saves a plot object as an image file that meets the dimension requirements of the "mobile devices and skins" product on society6.com (1300 pixels in width, 2000 pixels in height)
1 |
filename |
the filename including the extension |
plot |
the plot object you want to export in the phone size |
Note: current options are jpg or png, and this function has NOT been tested on Windows.
1 2 3 4 5 6 7 | # Base R example
p <- plot(iris$Sepal.Length, y = iris$Petal.Length, type = "p", col = iris$Species)
phone(filename = "iris_baseR.jpeg", plot = p, filetype = "jpeg")
## ggplot2 example
p <- ggplot(iris, aes(Sepal.Length, Petal.Length)) + geom_point(aes(color = Species))
phone(filename = "iris_ggplot.png", plot = p, filetype ="png")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.