Improve base::lapply()
and base::sapply()
functions by allowing
an extra index argument .I
to be passed into the function given in FUN
.
If the function given in FUN
has an argument .I
then, for each entry
of X
passed into FUN
the corresponding index is passed into
argument .I
. If the function given in FUN
has no argument .I
,
then lapplI
and sapplI
are exactly the same as
base::lapply()
and base::sapply()
.
Besides this extra feature, there is no difference to base::lapply()
and
base::sapply()
.
1 2 3 |
X |
a vector (atomic or list) or an |
FUN |
Here comes the great difference to |
... |
optional arguments to |
simplify |
logical or character string; should the result be
simplified to a vector, matrix or higher dimensional array if
possible? For |
USE.NAMES |
logical; if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.