Non-standard evaluation in a user-defined function with lapply or with in R
问题 I wrote a wrapper around ftable because I need to compute flat tables with frequency and percentage for many variables. As ftable method for class "formula" uses non-standard evaluation, the wrapper relies on do.call and match.call to allow the use of the subset argument of ftable (more details in my previous question). mytable <- function(...) { do.call(what = ftable, args = as.list(x = match.call()[-1])) # etc } However, I cannot use this wrapper with lapply nor with : # example 1: error