See repro code in:
https://rdotnet.codeplex.com/discussions/446998
Work over Nov 2013 to Jan 2013 makes the diagnosis easier.
Comments: Behavior in R console and from the C# R.NET differs. ``` C# var fname = "c:/tmp/rgraph.png"; engine.Evaluate("library(ggplot2)"); engine.Evaluate("library(scales)"); engine.Evaluate("library(plyr)"); engine.Evaluate("d <- data.frame( x = rnorm(1000), y = rnorm(1000), z = rnorm(1000))"); engine.Evaluate("p <- ggplot(d, aes(x = x, y = y, color = z)) + geom_point(size=4.5, shape=19)"); // Use: engine.Evaluate("png('" + fname + "')"); engine.Evaluate("print(p)"); // but not: // engine.Evaluate("p"); // engine.Evaluate("dev.copy(png, '" + fname + "')"); // the statement engine.Evaluate("p") does not behave the same as p (or print(p)) directly in the R console. engine.Evaluate("dev.off()"); ```
https://rdotnet.codeplex.com/discussions/446998
Work over Nov 2013 to Jan 2013 makes the diagnosis easier.
Comments: Behavior in R console and from the C# R.NET differs. ``` C# var fname = "c:/tmp/rgraph.png"; engine.Evaluate("library(ggplot2)"); engine.Evaluate("library(scales)"); engine.Evaluate("library(plyr)"); engine.Evaluate("d <- data.frame( x = rnorm(1000), y = rnorm(1000), z = rnorm(1000))"); engine.Evaluate("p <- ggplot(d, aes(x = x, y = y, color = z)) + geom_point(size=4.5, shape=19)"); // Use: engine.Evaluate("png('" + fname + "')"); engine.Evaluate("print(p)"); // but not: // engine.Evaluate("p"); // engine.Evaluate("dev.copy(png, '" + fname + "')"); // the statement engine.Evaluate("p") does not behave the same as p (or print(p)) directly in the R console. engine.Evaluate("dev.off()"); ```