Rserve-Ruby-client
Rserve-Ruby-client copied to clipboard
Using ggplot
I try to use rserve-ruby-client but I got a probleme with ggplot that don't display.
I first try this: r.eval("ggplot(df, aes(x=size,y=mem)))") and then that: r.eval("print(ggplot2::qplot(df, aes(x=size,y=mem)))") that give me the error Error in unit(at, "native") : 'x' and 'units' must have length > 0
I tried to save the last plot using
con.eval('ggsave("temp_gg2.png", device="png")')
This returns
#<Rserve::REXP::Null:0x007f8da96c2ff8 @attr=nil>
and the actual R server outputs
Saving 7 x 7 in image
but no such file is created anywhere on my disk.
I have created the same plot in Rstudio and the plot is displayed and can be saved using ggsave.