[R] list - environment coercion

2004-11-09 Thread Valery A.Khamenya
Hi all,
there is environment-list coercion, i.e. as.list.environment.
Is there any list-environment coercion?
thank you.
--
Valery.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] list - environment coercion

2004-11-09 Thread Dimitris Rizopoulos
Hi Valery,
a simple way to do it might be the following:
lis - list(a=10, b=20, d=x)
e1 - new.env()
for(i in 1:length(lis)) assign(names(lis)[i], lis[[i]], envir=e1)

d
get(d, env=e1)
I hope it helps.
Best,
Dimitris

Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message - 
From: Valery A.Khamenya [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 09, 2004 4:56 PM
Subject: [R] list - environment coercion


Hi all,
there is environment-list coercion, i.e. as.list.environment.
Is there any list-environment coercion?
thank you.
--
Valery.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html