You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rlang::abort("Did you mean to use `new_data` instead of `newdata`?")
It is used a couple of handfuls of times in this package along with other add-on packages.
newdata_abort<-function(...) {
if (any(names(rlang::enquos(...)) =="newdata"))
rlang::abort("Did you mean to use `new_data` instead of `newdata`?")
}
test<-function(...) {
newdata_abort(...)
list(...)
}
test(new_data="hello")
#> $new_data#> [1] "hello"
test(newdata="hello")
#> Error: Did you mean to use `new_data` instead of `newdata`?
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.
Should the following code be wrapped up in an exported helper function?
parsnip/R/linear_reg.R
Lines 236 to 237 in 37b07cb
It is used a couple of handfuls of times in this package along with other add-on packages.
Created on 2021-07-03 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: