Closed mine-cetinkaya-rundel closed 7 years ago
I'll do this. Will give me a chance to play around with this new formulation.
Is there a way to have the stat
in dplyr::summarize(stat = mean(!!sym(col)))
be variable based on the statistic chosen using the tidyeval
/rlang
syntax? Having the column be named stat
does work but I wonder about students being confused/forgetting, what the statistic was that they calculated.
Follow with %>% rename()
?
@andrewpbray Can this be closed?
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
This is relevant to
calculate
but maybe others too, if any of those use underscore verbs from dplyr, which is now deprecated functionality.Prototype for calculating for
stat == "mean"
Note that this requires importing the
sym
function from the rlang package, which dplyr currently does not import automatically.Is someone up for updating the calculate function with this, or should I? We also need to resolve #15 and #16 to and all of the updates can be done at once.