f <- fapply(rnorm, mean=0) %>%
fapply(matrix, ncol = 2)
f(200)
Instead of seeing a two-column matrix, we instead have just a 1 by 2 matrix. This is because the optional arguments in matrix() of nrow=1 is being forced. We should probably just omit optional arguments that are not specified when doing fapply().
Any reason we want to include "other_args"?
EDIT: I see we would need to include other_args that don't have default values set. In matrix(), this is problematic, because its primary argument 'data' already has a default value of NA. We need a clever way of figuring out which other arguments need to be specified, and omit the ones that have default values.
Consider the following unintended behavior:
Instead of seeing a two-column matrix, we instead have just a 1 by 2 matrix. This is because the optional arguments in matrix() of nrow=1 is being forced. We should probably just omit optional arguments that are not specified when doing fapply().
Any reason we want to include "other_args"?
EDIT: I see we would need to include other_args that don't have default values set. In matrix(), this is problematic, because its primary argument 'data' already has a default value of NA. We need a clever way of figuring out which other arguments need to be specified, and omit the ones that have default values.