[R] two dimensional array of object elements

Weijie Cai wcai11 at hotmail.com
Fri Feb 11 19:36:44 CET 2005


Hi list,

I want to create a two (possibly three) dimensional array of objects. These 
objects are classes in object oriented style. I failed by using
a<-array(NA,c(m,n))
for (i in 1:m){
  for (j in 1:n){
    a[i,j]<-My.Obj
  }
}

The elements are still NA. Any suggestions?

Thanks




More information about the R-help mailing list