I am trying to create a wrapper function around fixest::etable()
but get an error message even in the simplest case:
library(fixest)
mod <- feols(mpg ~ disp, data = mtcars)
my_etable <- function(...) {
etable(...)
}
my_etable(mod)
#> Error: in etable(...):
#> Argument `headers` could not be evaluated: ... used in a situation where it
#> does not exist
Created on 2024-05-27 with reprex v2.1.0
It does work when I capture the dots argument as a list:
my_etable <- function(...) {
m <- list(...)
etable(m)
}
However, this prevents me from passing arguments other than the model to etable()
. Ideally, I would like to run something like my_etable(mod, se.below = TRUE)
.