In my summary I wrote:
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)
Alan Zaslavsky has pointed out that:
> for (i in 1:length(A.list)) for (j in 1:length(B.list))
rm(list=paste(A.list[i], ".foo.",B.list[j], ".bar", sep=""))
does the trick and avoids the warinng messages associated with
> object.names <- vector(length=length(B.list))
> for (i in 1:length(A.list))
for (j in 1:length(B.list)){
assign(object.names[j], paste(A.list[i], ".foo.",
B.list[j], ".bar", sep=""))
rm(list=object.names)
}
and similar, which result from the fact that
> for each j you execute the rm(list=object.names).
> However when j=1, only the first element of object.names has been changed,
> the rest are still the original value of "FALSE".
Julian Wells
School of Management
The Open University
Walton Hall
Milton Keynes
MK7 6AA
United Kingdom
(01908) 654658
+44 (1908) 654658
|