Hello,

I have stored R objects as hexadecimals in a mysql database, I then usually 
transform them to binary and then save it into a file.  E.g.

  hex <- getBlob   #gets blob from database as hexadecimal
  binary <- transformToBinary(hex)  #moves from hex to binary

I would usually save them into a file as follows:

  writeBin(object=binary,con="fileName.txt")

Then eventually if I want to use it in R I just load it:

  load("fileName.txt")

However, how can I go from the binary directly into an Robject without writing 
it to a file?

  say:

  myObject <- unknownFunction(binary)

I hope this is enough detail.  Any help appreciated.

In retrospect, I could have probably used serialize/unserialize and store a 
serialize string in mysql and unserialize when needed ( or write to a file if 
necessary), but I didn't know of those when I did this.

Thanks in advance,

Ramiro

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to