From byron.ellis at gmail.com  Fri Aug 10 23:02:23 2007
From: byron.ellis at gmail.com (Byron Ellis)
Date: Fri, 10 Aug 2007 14:02:23 -0700
Subject: [Rd] Convert multiple C strings into an R character vector
In-Reply-To: <12098792.post@talk.nabble.com>
References: <12095059.post@talk.nabble.com> <m2fy2rclvc.fsf@fhcrc.org>
	<12098792.post@talk.nabble.com>
Message-ID: <7098abec0708101402x1d41d765l1d227482df1a5bd9@mail.gmail.com>

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 <jonathan.zhou at utoronto.ca> wrote:
>
> 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 vector that
> is passed back to the R code could be parsed back into the original R
> object.  Is this possible without bypassing through a temporary file? I'm
> not aware of a function or set of functions to do so.
>
> I know the above seems a little twisted in object conversion but I needed to
> do this as the original R object was created on a remote host and I'm trying
> to transfer the object from the remote host to the local host.
>
> Best Regards,
> Jon
> --
> View this message in context: http://www.nabble.com/Convert-multiple-C-strings-into-an-R-character-vector-tf4249882.html#a12098792
> Sent from the R devel mailing list archive at Nabble.com.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
Byron Ellis (byron.ellis at gmail.com)
"Oook" -- The Librarian



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