[R] converting an objects list
Anthony Fristachi
afristachi at portageinc.com
Wed May 5 18:26:58 CEST 2010
Jim,
Thank you very much for your prompt reply. This does exactly what I needed.
There is a steep learning curve going from SAS to R.
I had tried this approach before but did not include the "get" argument. I had never seen that used that before.
Tony
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
TONY FRISTACHI
Risk Assessor
Portage, Inc.
335 Central Park Square
Los Alamos, NM 87544
office: 505-663-1526 / fax: 505-662-7340
cell: 513-375-3263
www.portageinc.com
-----Original Message-----
From: Jim Lemon [mailto:jim at bitwrit.com.au]
Sent: Wednesday, May 05, 2010 2:54 AM
To: Anthony Fristachi
Cc: r-help at r-project.org
Subject: Re: [R] converting an objects list
On 05/05/2010 08:45 AM, Anthony Fristachi wrote:
> Hello,
>
> I would like to convert an objects list such as objects() or ls() that outputs "a101" "a102" "a104" "a107" "a109"
>
> to read within a list statement as follows : list(a101,a102,a104,a107,a109)
>
Hi Tony,
Try this:
x<-1:3
y<-letters[4:7]
z<-factor(c("fl","go","tw"))
result<-sapply(objects(),"get")
Jim
NON-DISCLOSURE NOTICE--This e-mail message and any attachments may contain confidential and privileged information intended for the sole use of the named recipient. If you receive this email in error, or if you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. Delivery of this message to any person other than the intended recipient is not intended to waive any right or privilege. If you have received this message in error, please delete it from your computer and contact the sender immediately.
More information about the R-help
mailing list