Dear all,
I am trying to learn lapply.
I would like, as a test case, to try the lapply alternative for the 


Shadowlist<-array(data=NA,dim=c(dimx,dimy,dimmaps))
for (i in c(1:dimx)){
    Shadowlist[,,i]<-i
}


---so I wrote the following---


returni <-function(i,ShadowMatrix) {ShadowMatrix<-i}
lapply(seq(1:dimx),Shadowlist[,,seq(1:dimx)],returni)

So far I do not get same results with both ways.
Could you please help me understand what might be wrong?


Regards
Alex

______________________________________________
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 provide commented, minimal, self-contained, reproducible code.

Reply via email to