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

[Rd] available.packages (PR#9841)

2007-08-10 Thread zivan . karaman
Full_Name: Zivan Karaman Version: 2.5.1 OS: Windows XP SP2 Submission from: (NULL) (195.6.68.214) I think that I have encountered a bug in the function "available.packages" when using a local repository (file://…) on Windows. Version information: platform i386-pc-mingw32 arch

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] errors in loading packages (PR#9839)

2007-08-10 Thread Uwe Ligges
Gregory Warnes wrote: > Another way of answering the question: The gmodels and gregmisc > package both depend on the gtools package. Either install that > first, or tell R to install all dependencies. From the command line: > > install.packages(..., depends=TRUE) ... and dependenci

[Rd] suggestion with ambiguous object component replacement

2007-08-10 Thread Benjamin Tyner
?"[<-" says "When replacing (that is using indexing on the lhs of an assignment) NA does not select any element to be replaced. As there is ambiguity as to whether an element of the rhs should be used or not, this is only allowed if the rhs value is of length one (so the two interpretations would

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

Re: [Rd] Manipulating R objects in C++

2007-08-10 Thread Jonathan Zhou
Nevermind about the boolean object, after thinking about it for 2 seconds, I figured it out. Just going to translate the boolean to an integer object with 1 representing true and 0=false and send that to C :P. -- View this message in context: http://www.nabble.com/Manipulating-R-objects-in-C%

Re: [Rd] errors in loading packages (PR#9839)

2007-08-10 Thread Gregory Warnes
Another way of answering the question: The gmodels and gregmisc package both depend on the gtools package. Either install that first, or tell R to install all dependencies. From the command line: install.packages(..., depends=TRUE) or the equivalent checkbox in the UI. -G On Aug