Loop in matrix in a function

I have a function(data, xnames, wnames,……). In the parameters of this function, data is a matrix(100×5). When I apply this function, I want to get such a loop: Each matrix in the data has one more row than the previous matrix, loop 100 times like this. In other words, I have to run this function 100 times. So I want to use a loop to achieve it.

See ?lapply and then you should be able to adapt what I wrote in your previous question question, eg lapply(data, function)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.