Replicate a function with different size of cases

You can use Map() to iterate over your changing parameters

do.call("rbind", Map(function(x,y) {
  data.frame(cluster=x, tsfunc(y))
}, 1:4, c(10,20,40,80)))

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top