Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Hin-Tak Leung
R_serialize is the C API counter-part of the serialize() in R. Reading ?serialize in R would probably do . It would also help if one understands connections (?connection) - the C API equivalent is R_connection or R_conn - 'May the source be with you', to paraphrase Yoda. (the serialization code is

Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Byron Ellis
No idea, but if you can get a BLOB through it then you should be fine. http://www.stat.uiowa.edu/~luke/R/serialize/serialize.html is your best bet for documentation. I'm not sure what its "Official API" status might be (nor do I care). On 8/10/07, Jonathan Zhou <[EMAIL PROTECTED]> wrote: > > Hey,

Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Jonathan Zhou
Hey, I'm actually passing the R objects between hosts through a middleware software called Symphony. I'm not sure if R_Serialize/Unserialize will be of use to me. On that note, after searching through the R manuals and using "RSiteSearch", I wasn't able to find any documentation regarding R_Ser

Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Byron Ellis
R_Serialize and R_Unserialize let you marshal objects across the wire. The actual protocol implementation is up to you, but everything you need is there without having to resort to a temporary file or, at the very least, reparsing a set of strings. On 8/10/07, Jonathan Zhou <[EMAIL PROTECTED]> wro

Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Jonathan Zhou
Thanks Seth I got the code to work. I've actually got a followup question. The strings were created from reading a file where an R object was placed in using "dput", meaning the strings hold R objects in character string format. My original intention for doing this was so that the character

Re: [Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Seth Falcon
Jonathan Zhou <[EMAIL PROTECTED]> writes: > I was hoping someone could tell me how to convert multiple C character > strings into an R character vector. Here's a quick untested sketch: char **yourStrings; int numStrings = /* the length of yourStrings */; int i; SEXP cvect;

[Rd] Convert multiple C strings into an R character vector

2007-08-10 Thread Jonathan Zhou
I was hoping someone could tell me how to convert multiple C character strings into an R character vector. Thanks, Jon -- View this message in context: http://www.nabble.com/Convert-multiple-C-strings-into-an-R-character-vector-tf4249882.html#a12095059 Sent from the R devel mailing list arch