Skip to content
Prev 257190 / 398506 Next

mapply to lapply

My solution would be to use an index variable that goes from 1 to the number of rows that are to be processed, along with a helper function which calls Fwithcellvalue with the suitable arguments:

F2[i+1,j+1]<-sum(lapply(1:nrow(cells), function(rowInd) 
Fwithcellvalue(i=i,j=j,a=cells[rowInd,2],b=cells[rowInd,4],c=cells[rowInd,1],d=cells[rowInd,3],e=cells[rowInd,5]))


Best regards,

Andreas

Alaios schrieb: