Or see the "Oarray" package (note that's
a letter O, not a zero!)
Ben Bolker
__
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 provid
On Feb 18, 2008 6:52 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> You can define origin 0 objects yourself if you like.
> Here is a partial implementation:
>
> "[.orig0" <- function(x, i)
The 0 should be a 1.
>if (is.numeric(i)) .subset(x, i+0) else .subset(x, i)
> orig0 <- function(x)
You can define origin 0 objects yourself if you like.
Here is a partial implementation:
"[.orig0" <- function(x, i)
if (is.numeric(i)) .subset(x, i+0) else .subset(x, i)
orig0 <- function(x)
structure(x, class = c("orig0", setdiff(class(x), "orig0")))
x <- orig0(1:5)
x[0:3] # 1:4
Note tha
3 matches
Mail list logo