Re: [Rd] String to list and visa versa

2006-11-15 Thread Tom McCallum
On Wed, 15 Nov 2006 05:00:28 -, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > On Tue, 14 Nov 2006, Vladimir Dergachev wrote: > >> On Tuesday 14 November 2006 12:28 pm, Prof Brian Ripley wrote: >>> This approach won't work in very many cases (but then nor will >>> write.csv). >>> >>> The s

Re: [Rd] String to list and visa versa

2006-11-14 Thread Prof Brian Ripley
On Tue, 14 Nov 2006, Vladimir Dergachev wrote: > On Tuesday 14 November 2006 12:28 pm, Prof Brian Ripley wrote: >> This approach won't work in very many cases (but then nor will write.csv). >> >> The safest way I know is to use serialize() and unserialize(). Next to >> that, deparse(control="all"

Re: [Rd] String to list and visa versa

2006-11-14 Thread Vladimir Dergachev
On Tuesday 14 November 2006 12:28 pm, Prof Brian Ripley wrote: > This approach won't work in very many cases (but then nor will write.csv). > > The safest way I know is to use serialize() and unserialize(). Next to > that, deparse(control="all") and parse(text=) are quite good and give a > human-r

Re: [Rd] String to list and visa versa

2006-11-14 Thread Peter Dalgaard
"Tom McCallum" <[EMAIL PROTECTED]> writes: > Hi, > > I need to collapse a list into a string and then reparse it back into the > list. Normally when I need to do this I simply use write.csv and > read.csv, but I need to do this in memory within R rather than writing out > to file. > Are

Re: [Rd] String to list and visa versa

2006-11-14 Thread Prof Brian Ripley
This approach won't work in very many cases (but then nor will write.csv). The safest way I know is to use serialize() and unserialize(). Next to that, deparse(control="all") and parse(text=) are quite good and give a human-readable character representation. If fidelity is not the main issue,

Re: [Rd] String to list and visa versa

2006-11-14 Thread Vladimir Dergachev
On Tuesday 14 November 2006 12:00 pm, Tom McCallum wrote: > Hi, > > I need to collapse a list into a string and then reparse it back into the > list. Normally when I need to do this I simply use write.csv and > read.csv, but I need to do this in memory within R rather than writing out > to file.