source and load direct via bytearray

Apr 4, 2014 at 8:25 AM
Hello,

I have saved R scripts, workspaces and variables and stored them in a SQL database as bytearray. To transfer them back into rdotnet I load the selected information from the SQL Database in a bytearray, save this array in a file and load this file using e.g. __engine.Evaluate(@"source('file.bin');") or __engine.Evaluate(@"load('file.bin');"); again.
Is there a way to transfer them directly as bytearray to rdotnet without saving the data first into a file?

Thanx
Developer
Apr 8, 2014 at 12:08 PM
Hello,

Interesting. I wonder whether similar questions outside of R.NET were asked. It may be worth asking on StackOverflow as a general R question.

R.NET does not offer particular facilities, but if there is a way to do this in R (in-memory byte array load from a DB) , I am not sure something more in R.NET is required. The load function in R accepts connection objects, besides file paths. So, creating from .NET a SymbolicExpression that points to a connection object, and passing it to the load function is what I would look for. I am not familiar with these R objects of class connection

I can only offer thought bubbles really, this is a rather advanced usage, that could lead you to some arcane corners of R. Then again, I may overestimate the difficulty. Let us know if you gain some insights.