Marc,
it's perfect!!!!
THANKS a lot for your help.
grazia

On Wed, 10 May 2006, Marc Schwartz (via MN) wrote:

> On Wed, 2006-05-10 at 13:19 -0500, Marc Schwartz (via MN) wrote:
>> A search for the list2ascii() function, led me to this post by Mike
>> Prager:
>>
>> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/66335.html
>>
>> in which Mike specifically notes:
>>
>> "To write it to a file that can be read by R, I would suggest using
>> "dput" instead."
>>
>>
>> Thus, instead of using list2ascii() on your list object, use:
>>
>> sink("YourTextFile")
>> dput(YourListObject)
>> sink()
>>
>> You can then re-read the text file back into R using:
>>
>> source("YourTextFile")
>
> Actually, quick correction here. That should be:
>
>  NewListObject <- dget("YourTextFile")
>
> dget() will enable simple assignment of the textual input, whereas
> source() will just evaluate it and assignment with source() creates a
> list object, unless you use:
>
>  NewListObject <- source("YourTextFile")$value
>
> Marc
>
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to