On Jul 9, 2011, at 11:42 PM, David Winsemius wrote:
On Jul 9, 2011, at 9:37 PM, Rolf Turner wrote:
On 10/07/11 12:12, David Winsemius wrote:
<SNIP>
Uhhh, you meant
drpidx <- -c(5,10, i)
x <- x[-drpidx, ]
Yes, I certainly did. Thanks for the correction.
A little bird has tweeted that I might NOT have wanted to accept that"
> i <- 5
> del.idx <- c(4,7,i) # Notice no minus sign.
> (1:10)[-del.idx]
[1] 1 2 3 6 8 9 10
Double negation turns the result positive:
> del.idx <- -c(4,7,i)
> (1:10)[-del.idx] # minus a minus
[1] 4 7 5
cheers,
Rolf Turner
--
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.