Message-ID: <644e1f320911191429l1efdca12pb439b7c31ae61da@mail.gmail.com>
Date: 2009-11-19T22:29:49Z
From: jim holtman
Subject: Is there an variant of apply() that does not return anything?
In-Reply-To: <366c6f340911191421t36602a19m9811d1cf517936cd@mail.gmail.com>
invisible(apply(...))
On Thu, Nov 19, 2009 at 5:21 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
> 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})
>
> ______________________________________________
> R-help at 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?