rstudio / gradethis

Tools for teachers to use with learnr
https://pkgs.rstudio.com/gradethis/
Other
161 stars 40 forks source link

Standardize arguments in `...` of mapping functions #344

Closed rossellhayes closed 1 year ago

rossellhayes commented 1 year ago
library(gradethis)
library(purrr)

gradethis:::call_standardise_formals(quote(
  map(list(1:10, 1:20), mean, 0.1, TRUE)
))
#> map(.x = list(1:10, 1:20), .f = mean, trim = 0.1, na.rm = TRUE, 
#>     .progress = FALSE)

code_feedback(
  user_code     = "map(list(1:10, 1:20), mean, 0.1, TRUE)",
  solution_code = "map(list(1:10, 1:20), mean, trim = 0.1, na.rm = TRUE)"
)
#> NULL

Created on 2023-05-01 with reprex v2.0.2

Closes #343.