[R] Is there an variant of apply() that does not return anything?

Peng Yu pengyu.ut at gmail.com
Thu Nov 19 23:21:06 CET 2009


There are a few version of apply() (e.g., lapply(), sapply()). I'm
wondering if there is one that does not return anything but just
silently apply a function to the list argument.

For example, the plot function is applied to each element in 'alist'.
It is redundant to return anything from apply.

apply(alist,function(x){ plot each element of alist})




More information about the R-help mailing list