88# if (length(orig_rows) != nrow(x_vals)) {
99# msg <- "Some assessment set rows are not available at prediction time."
1010#
11- # if (has_preprocessor_recipe(workflow)) {
11+ # if (. has_preprocessor_recipe(workflow)) {
1212# msg <-
1313# c(
1414# msg,
@@ -129,28 +129,40 @@ finalize_workflow_preprocessor <- function(workflow, grid_preprocessor) {
129129 recipe <- extract_preprocessor(workflow )
130130 recipe <- merge(recipe , grid_preprocessor )$ x [[1 ]]
131131
132- workflow <- set_workflow_recipe(workflow , recipe )
132+ workflow <- . set_workflow_recipe(workflow , recipe )
133133
134134 workflow
135135}
136136
137137# ------------------------------------------------------------------------------
138138
139- has_preprocessor <- function (workflow ) {
140- has_preprocessor_recipe(workflow ) ||
141- has_preprocessor_formula(workflow ) ||
142- has_preprocessor_variables(workflow )
139+ # ' @export
140+ # ' @keywords internal
141+ # ' @rdname empty_ellipses
142+ .has_preprocessor <- function (workflow ) {
143+ .has_preprocessor_recipe(workflow ) ||
144+ .has_preprocessor_formula(workflow ) ||
145+ .has_preprocessor_variables(workflow )
143146}
144147
145- has_preprocessor_recipe <- function (workflow ) {
148+ # ' @export
149+ # ' @keywords internal
150+ # ' @rdname empty_ellipses
151+ .has_preprocessor_recipe <- function (workflow ) {
146152 " recipe" %in% names(workflow $ pre $ actions )
147153}
148154
149- has_preprocessor_formula <- function (workflow ) {
155+ # ' @export
156+ # ' @keywords internal
157+ # ' @rdname empty_ellipses
158+ .has_preprocessor_formula <- function (workflow ) {
150159 " formula" %in% names(workflow $ pre $ actions )
151160}
152161
153- has_preprocessor_variables <- function (workflow ) {
162+ # ' @export
163+ # ' @keywords internal
164+ # ' @rdname empty_ellipses
165+ .has_preprocessor_variables <- function (workflow ) {
154166 " variables" %in% names(workflow $ pre $ actions )
155167}
156168
@@ -162,16 +174,25 @@ has_case_weights <- function(workflow) {
162174 " case_weights" %in% names(workflow $ pre $ actions )
163175}
164176
165- has_spec <- function (workflow ) {
177+ # ' @export
178+ # ' @keywords internal
179+ # ' @rdname empty_ellipses
180+ .has_spec <- function (workflow ) {
166181 " model" %in% names(workflow $ fit $ actions )
167182}
168183
169- set_workflow_spec <- function (workflow , spec ) {
184+ # ' @export
185+ # ' @keywords internal
186+ # ' @rdname empty_ellipses
187+ .set_workflow_spec <- function (workflow , spec ) {
170188 workflow $ fit $ actions $ model $ spec <- spec
171189 workflow
172190}
173191
174- set_workflow_recipe <- function (workflow , recipe ) {
192+ # ' @export
193+ # ' @keywords internal
194+ # ' @rdname empty_ellipses
195+ .set_workflow_recipe <- function (workflow , recipe ) {
175196 workflow $ pre $ actions $ recipe $ recipe <- recipe
176197 workflow
177198}
0 commit comments