rpng {remoter} | R Documentation |
Provide a graphic device locally for plots generated on server of Remote R
rpng()
generates locally a device/window.
rpng.new()
generates locally a device/window.
rpng.off()
turns off locally a device/window.
dev.off()
is an alias of rpng.off()
in order to consisten
with th original device function grDevices::dev.off()
.
rpng.new(expr, filename = NULL, width = 587, height = 586, units = "px", pointsize = 12, bg = "white", res = 96, ...) rpng.off(which = grDevices::dev.cur()) dev.off(which = grDevices::dev.cur())
expr |
An expression or a function generating a plot. This checks in the
following orders: expression or ggplot. The ggplot
are eval'd within the |
filename |
A temporary file to save the plot on server |
width |
width of the plot as in |
height |
height of the plot as in |
units |
units of the width and height as in |
pointsize |
pointsze of the plotted text as in |
bg |
background colour as in |
res |
resolution as in |
... |
additional arguments as in |
which |
An integer specifying a device number as in |
Remote R PNG Device
## Not run: ### Prompts are listed to clarify when something is eval'd locally vs ### remotely > # suppressMessages(library(remoter, quietly = TRUE)) > # client() > remoter::client("192.168.56.101") remoter> plot(1:5) remoter> rpng.off() remoter> rpng() remoter> plot(iris$Sepal.Length, iris$Petal.Length) remoter> rpng.off() remoter> library(ggplot2) remoter> g1 <- ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, remoter+ color = Species)) + remoter+ geom_point(aes(shape = Species)) remoter> rpng() remoter> print(g1) remoter> rpng.off() remoter> g1 + geom_smooth(method = "lm") remoter> rpng.new(plot(1:5)) remoter> rpng.new(g1) remoter> b <- function() plot(iris$Sepal.Length, iris$Petal.Length) remoter> rpng.new(b) remoter> da <- data.frame(x = rnorm(100), y = rnorm(100)) remoter> g2 <- ggplot(da, aes(x, y)) + geom_point() remoter> g2 remoter> pdf() remoter> g2 remoter> print(g2 + geom_line()) remoter> dev.off() remoter> q() > ## End(Not run)