Hi R users: I got an error that "l1" is not found.
This is a sample code: f1<-function(i,l1){ print(l1[[i]]) l1[[i+1]]<<-i return(i) } z1<-list(x=100,NULL,a=c(1,1)) lapply(1:3,f1,l1=z1) My final goal is to update the value of each list component to use it in the following step. I see that print function founds l1[[1]], but the assign instruction not. Thank you for your help. Kenneth PD: R.Version()$version.string [1] "R version 2.10.0 Patched (2009-11-24 r50556)" on Ubuntu linux. ______________________________________________ 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.