[R] generic arrays in R

Tamas K Papp tpapp at Princeton.EDU
Fri Nov 3 01:37:37 CET 2006


Dear R users,

Are there any generic arrays (arrays which can store arbitrary
objects) in R?  Something along the lines of

f <- function(x) x^2
a <- array(f,c(2,2))

etc.

I have found fasp in the spatstat package, but in my particular case,
I need an array of polynomials, not functions.  I know how to hack
this together (polynomials can be represented as vectors, so I just
extend the dimension) but I am looking for something more generic, and
later I might switch to splines.

The numerical problem I am solving is the following: I have an array
with four indices (a[i,j,k,l]), and I would like to fit something
smooth on of one the dimensions, say l, because I need
interpolated/smoothed values for intermediate points.

Thanks,

Tamas



More information about the R-help mailing list