[R] simple for loop

Liaw, Andy andy_liaw at merck.com
Sat Nov 16 19:12:55 CET 2002


"i" just contains a string.  What you want is the object with that name,
which is what get() gives you.  Do read the help page for get().

Andy

-----Original Message-----
From: Stephan Holl [mailto:sholl at gmx.net]
Sent: Saturday, November 16, 2002 2:42 AM
To: r-help at stat.math.ethz.ch
Cc: Liaw, Andy
Subject: Re: [R] simple for loop


At Fri, 15 Nov 2002 20:34:28 -0500 Liaw, Andy wrote:

Hello Andy,

> Try this inside your loop:
> 
> if (dim(get(i))[1] == 0) rm(list=i)
this works so far, but could you please give my a hint what I did wrong?
what does the get() do ?

I was struggeling inside some other for loops, and it seems that there
was another get() missing.
So do I have to use the get() always inside a loop in order to "get" the
correct i-values pasted in ?

Thank you
cheers
  Stephan

-- 
Stephan Holl

GnuPG Key-ID: 11946A09
ICQ# 117277975 

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list