orbital_sql {orbital} | R Documentation |
Convert to SQL code
Description
Returns SQL code that is equivilant to prediction code.
Usage
orbital_sql(x, con)
Arguments
x |
An orbital object. |
con |
A connection object. |
Details
This function requires a database connection object, as the resulting code SQL code can differ depending on the type of database.
Value
SQL code.
Examples
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)
library(dbplyr)
con <- simulate_dbi()
orbital_sql(orbital_obj, con)
[Package orbital version 0.2.0 Index]