R. Michael Weylandt wrote:
>
> This may be an unnecessary aside, but other than obfuscating
> code or allowing people to never stop thinking in C and start
> thinking in R, what practical purpose would this package
> serve in an R context?
>
I'd think about constructs like
income[1990:2010]
which work nicely with arbitrary indexing. (Oarray isn;t just 0)
Fortran has it natively; C doesn't, but it was useful enough for Numerical
Recipes to provide code for arbitrary array index origin for C arrays (it used
a pointer shift, if I recall correctly). The most obvious native R appraoch I
can think of is using names (eg income[paste(1990:2010)] ), which is very
general but has its own disadvantages in terms of readability and, maybe,
speed.
S Ellison
LGC*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
______________________________________________
[email protected] 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.