I\'m learning R recently and confused by two function: lapply
and do.call
. It seems that they\'re just similar to map
function in Lisp.
In most simple words:
lapply() applies a given function for each element in a list,so there will be several function calls.
do.call() applies a given function to the list as a whole,so there is only one function call.
The best way to learn is to play around with the function examples in the R documentation.