Create a new function that returns the existing function wrapped in a
data.frame with a single column, value
.
# S3 method for `function`
as.data.frame(x, row.names, optional, ...)
function to make return a data frame
necessary to match the generic, but not used
necessary to match the generic, but not used
necessary to match the generic, but not used
This is useful when calling *dply
functions with a function that
returns a vector, and you want the output in rows, rather than columns.
The value
column is always created, even for empty inputs.