Skip to content

export make_call for parsnip-adjacent packages #383

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

Merged
merged 1 commit into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export(is_varying)
export(keras_mlp)
export(linear_reg)
export(logistic_reg)
export(make_call)
export(make_classes)
export(mars)
export(maybe_data_frame)
Expand Down
10 changes: 10 additions & 0 deletions R/arguments.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ eval_args <- function(spec, ...) {
# defaults = list()
# )

#' Make a parsnip call expression
#'
#' @param fun A character string of a function name.
#' @param ns A character string of a package name.
#' @param args A named list of argument values.
#' @details The arguments are spliced into the `ns::fun()` call. If they are
#' missing, null, or a single logical, then are not spliced.
#' @return A call.
#' @keywords internal
#' @export
make_call <- function(fun, ns, args, ...) {
# remove any null or placeholders (`missing_args`) that remain
discard <-
Expand Down
26 changes: 26 additions & 0 deletions man/make_call.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.