Applies a function fun on each element of input x
and combines the results as data.frame columns.
The results will get replicated to have equal length
if necessary and possible.
Usage
dapply(x, fun, ..., col.names)
Arguments
- x
[data.frame]
Data frame.
- fun
[function]
The function to apply.
- ...
[any]
Further arguments passed down to fun.
- col.names
[character(1)]
Column names for result.
Default are the names of x.