Learn R Programming

orbital (version 0.4.1)

predict.orbital_class: Prediction using orbital objects

Description

Running prediction on data frame of remote database table, without needing to load original packages used to fit model.

Usage

# S3 method for orbital_class
predict(object, new_data, ...)

Value

A modified data frame or remote database table.

Arguments

object

An orbital object.

new_data

A data frame or remote database table.

...

Not currently used.

Details

Using this function should give identical results to running predict() or bake() on the orginal object.

The prediction done will only return prediction colunms, a opposed to returning all modified functions as done with orbital_inline().

Examples

Run this code
if (FALSE) { # rlang::is_installed(c("recipes", "tidypredict", "workflows"))
library(workflows)
library(recipes)
library(parsnip)

rec_spec <- recipe(mpg ~ ., data = mtcars) |>
  step_normalize(all_numeric_predictors())

lm_spec <- linear_reg()

wf_spec <- workflow(rec_spec, lm_spec)

wf_fit <- fit(wf_spec, mtcars)

orbital_obj <- orbital(wf_fit)

predict(orbital_obj, mtcars)
}

Run the code above in your browser using DataLab