Created
February 5, 2019 14:36
-
-
Save grayskripko/13b241df15daa0a802d10758fe30d13e to your computer and use it in GitHub Desktop.
partial() vs do.call()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # now it works! | |
| mean_cust <- function(...) partial(mean, !!!list(...)) | |
| mean_cust(na.rm = T)(c(1:3, NA)) | |
| # >[1] 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment