clbustos / Rserve-Ruby-client

Pure Ruby client for Rserve. Based on 'new' Java client provided with server, but with modifications to adhere to POLS
http://github.com/clbustos/Rserve-Ruby-client
127 stars 27 forks source link

Using ggplot #14

Open ptitpoulpe opened 11 years ago

ptitpoulpe commented 11 years ago

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

obromios commented 6 years ago

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.