Renjin "save" saves frame zero data

I have the following Renjin

Java Code, the code assigns data from Java to Renjin (2 double arrays), creates a new dataframe, prints and saves it like Rdata

below:

 engine.put("adId", adId);
 engine.put("LandscapeCurrent", LandscapeCurrent);
 engine.eval("df=data.frame(ad_id=adId,LandscapeCurrent=LandscapeCurrent)");
 engine.eval("print(df)");
 engine.eval("save(df,file='C:/Users/yschellekens.INTRANET/Desktop/Stack overflow/output.Rdata')");

      

Df standard output (inside NetBeans

):

  ad_id            LandscapeCurrent
  1 20383789401      244770561       
  2 20763458001      237478641       
  3 19807565841      231586281       
  4 20320895121      243414801       
  5 20923711401      251952681
  ... 

      

After running the Java code, when I load data (df) into R, I get a zero data frame:

load('C:/Users/yschellekens.INTRANET/Desktop/Stack overflow/output.Rdata')
> dput(df)
structure(list(ad_id = numeric(0), LandscapeCurrent = numeric(0)), class = "data.frame", .Names = c("ad_id", 
"LandscapeCurrent"), row.names = integer(0))

      

+3


source to share





All Articles