[R] lapply without return values?
Rainer M Krug
r.m.krug at gmail.com
Fri Jan 25 09:34:32 CET 2008
Hi
I am looking for a function which is executing some code repeatedly,
exactly like lapply() and sappl() are doing, but do not return anything
as I am not interested in the return values.
An example would be:
> p <- data.frame(runif(10), runif(10), runif(10))
> lapply( p, function(ps) {x11(); plot(ps)} )
which results in three graphs and a printout:
$runif.10.
NULL
$runif.10..1
NULL
$runif.10..2
NULL
>
How can I avoid this printout without using
tmp <- lapply( p, function(ps) {x11(); plot(ps)} )?
Thanks,
Rainer
More information about the R-help
mailing list