Skip to content
Prev 48971 / 63424 Next

negative numerics in []

I can reproduce this.  It seems to be happen when trying to drop the
last element, e.g.
[1] 1 2 3
[1] 1 3
[1] 2 3
[1] 1 2
[1] 2
[1] 1 2 3
[1] 1 2 4
[1] 1 3 4
[1] 2 3 4
[1] 1

My *guess* (all time I have) is that it's a bug where as.integer() is
applied only *after* (silently) dropping negative indices out of
range, e.g.
[1] 4

Here -c(4:10+0.1) are dropped because they all > length(x).

If someone wish to track this down further, the R source is available
at https://svn.r-project.org/R/trunk/ (mirrored at
https://github.com/wch/r-source).

/Henrik
On Thu, Sep 4, 2014 at 8:17 AM, Michael Haupt <michael.haupt at oracle.com> wrote: