s-news
[Top] [All Lists]

SUMMARY: Loops to create "what" for rm(list=what)

To: "S-plus list (S-plus list)" <s-news@wubios.wustl.edu>
Subject: SUMMARY: Loops to create "what" for rm(list=what)
From: "P.J.Wells" <P.J.Wells@open.ac.uk>
Date: Thu, 24 Apr 2003 15:28:50 +0100
From Patrick Burns:

object.names[j] <- paste(...

# This works for me (tho' I'd be interested to know why I get warnings like
#
# Warning messages:
#   Warning in remove(list): "a1.foo.b1.bar" to be removed not in database
#
# -- but a1.foo.b1.bar is nonetheless removed)


From Bert Gunter:

Instead of the second construction, you should try using subscripts with
regular expressions on objects() to pick out the objects that you wish to
remove.

Actually, I think if you wrote your script in a function with A.list and
B.list as arguments, everything you created would be local so after saving
it, you would exit the function and have nothing to remove from your working
data.

From Stephen Smith:

remove(c(objects(pattern="*.foo"),objects(pattern="*.bar")))


Tbanks to all

Julian Wells

School of Management
The Open University
Walton Hall
Milton Keynes
MK7 6AA
United Kingdom

(01908) 654658
+44 (1908) 654658 

<Prev in Thread] Current Thread [Next in Thread>
  • SUMMARY: Loops to create "what" for rm(list=what), P.J.Wells <=