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
I am dealing with automating scraping from a form that has lots of checkboxes that I want to programmatically set.
Right now I'm doing
vals <- list(form = f) vals[list_of_boxes_to_check] <- 'on' f <- do.call(set_values, vals)
It would be nice to have a trailing-underscore variant set_values_, like the corresponding functions in dplyr with which I could do
set_values_
vals <- set_names(rep('on', length(list_of_boxes_to_check)), list_of_boxes_to_check) f <- set_values_(f, .dots = vals)
If there is not a reason why this would be a bad idea, I can implement it and submit a pull-request.
The text was updated successfully, but these errors were encountered:
+1 for this feature but would be nice to keep the same function handle, just recognize if a list is input then apply it. Can also help with pull request if needed.
Sorry, something went wrong.
For anyone else with this issue, I've constructed a little wrapper for set_values that takes a list as input using do.call:
set_values
do.call
set_vals_batch <- function(form, .l) { do.call(function(...) { set_values(form, ...) }, .l) }
This will likely be solved by switching from list() to list2() so you can do set_values(form, !!!vals)
list()
list2()
set_values(form, !!!vals)
bc09b62
No branches or pull requests
I am dealing with automating scraping from a form that has lots of checkboxes that I want to programmatically set.
Right now I'm doing
It would be nice to have a trailing-underscore variant
set_values_
, like the corresponding functions in dplyr with which I could doIf there is not a reason why this would be a bad idea, I can implement it and submit a pull-request.
The text was updated successfully, but these errors were encountered: