0

I have requirement to read data from ".RData" files and process them in C# application. I could not find any API which I can use in C#, I believe there is an API for F# which I don't use as of now because of learning curve in F#.

Could anybody please suggest code or API to read ".Rdata" files?

Neeraj Kaushik
  • 354
  • 1
  • 5
  • 20
  • 2
    This might be helpful - http://stackoverflow.com/questions/26981755/it-is-possible-to-read-rdata-file-format-from-c-or-fortran – tofutim May 15 '16 at 05:27
  • 1
    @42- how is this a duplicate of a quesiton for different programming languages? – zaitsman Aug 17 '17 at 12:50
  • Because there is no API for .Rdata files. In fact there's no guarantee that an rdata file from one version an be read by a different R version. – IRTFM Aug 18 '17 at 21:29
  • See this thread on R-help: http://r-project.markmail.org/search/?q=API+.rdata#query:API%20.rdata+page:1+mid:3fevwtpavackl7li+state:results – IRTFM Aug 18 '17 at 21:53

1 Answers1

0

There's R.NET which would allow you to execute the load function, then get the saved variables from the environment, maybe? My guess is you'll need to run something like

 engine.Evaluate("load('/my/data/dir/mydata.RData')");
 var data = engine.GetSymbol("myvariablename");
Steve Cooper
  • 20,542
  • 15
  • 71
  • 88