On reply to the post http://r.789695.n4.nabble.com/using-lapply-td3345268.html
Dear Kushan, this may be a good start: ## assuming 'instr.list' is your list object and you are applying my.strat() function on each element of that list, you can use lapply function as lapply(instr.list, function(x) return(my.strat(x))) Here resulting element will again be another list with length is same as the length of your original list 'instr.list.' Instead if the returned object for my.strat() function is a single number then you might want to create a vector instead list, in that case just use 'sapply' HTH Arun, [[alternative HTML version deleted]] ______________________________________________ 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.