Skip to content

Commit 0c23061

Browse files
authored
Merge pull request #383 from tidymodels/export-make-call
export make_call for parsnip-adjacent packages
2 parents 8af904b + d02bbe6 commit 0c23061

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export(is_varying)
128128
export(keras_mlp)
129129
export(linear_reg)
130130
export(logistic_reg)
131+
export(make_call)
131132
export(make_classes)
132133
export(mars)
133134
export(maybe_data_frame)

R/arguments.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ eval_args <- function(spec, ...) {
131131
# defaults = list()
132132
# )
133133

134+
#' Make a parsnip call expression
135+
#'
136+
#' @param fun A character string of a function name.
137+
#' @param ns A character string of a package name.
138+
#' @param args A named list of argument values.
139+
#' @details The arguments are spliced into the `ns::fun()` call. If they are
140+
#' missing, null, or a single logical, then are not spliced.
141+
#' @return A call.
142+
#' @keywords internal
143+
#' @export
134144
make_call <- function(fun, ns, args, ...) {
135145
# remove any null or placeholders (`missing_args`) that remain
136146
discard <-

man/make_call.Rd

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)