Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize arguments in ... of mapping functions #344

Merged
merged 7 commits into from
May 3, 2023

Conversation

rossellhayes
Copy link
Contributor

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.

@rossellhayes rossellhayes self-assigned this May 1, 2023
Copy link
Contributor

@nischalshrestha nischalshrestha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@rossellhayes rossellhayes merged commit e9fb77e into main May 3, 2023
@rossellhayes rossellhayes deleted the feat/standardize-map-args branch May 3, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

code_feedback() is too sensitive to argument names passed through ...
2 participants