Re: R-alpha: [[ ]] subscript out of bounds

Paul Gilbert (pgilbert@bank-banque-canada.ca)
Tue, 25 Jun 1996 11:30:55 -0400


Date: Tue, 25 Jun 1996 11:30:55 -0400
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
To: rgentlem@stat.auckland.ac.nz
Subject: Re: R-alpha: [[ ]] subscript out of bounds
Message-Id: <96Jun25.113222edt.29447@mailgate.bank-banque-canada.ca>


Robert

There may be a lot of changes in my code, but in theory I am not
opposed to the idea of deleting list elements, if they exist, before
appending the new ones. But I don't see an easy way to do this without
looping (which I really don't want to do because it will make the S
version even slower):

> z <- list(a=1, b=2)
> z[[c("b","d")]] <- NULL
Error: subscript out of bounds
> is.null(z[[c("b","d")]])
Error: attempt to select more than one element

Any suggestions?

Paul
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-