tidypredict_sql

Returns a SQL query with formula to calculate fitted values

tidypredict_sql(model, con)

Arguments

model

An R model or a tibble with a parsed model

con

Database connection object. It is used to select the correct SQL translation syntax.

Examples

library(dbplyr)
#> #> Attaching package: ‘dbplyr’
#> The following objects are masked from ‘package:tidypredict’: #> #> ident, sql
#> The following objects are masked from ‘package:dplyr’: #> #> ident, sql
model <- lm(mpg ~ wt + am + cyl, data = mtcars) tidypredict_sql(model, simulate_dbi())
#> <SQL> (((39.4179334351865) + (("wt") * (-3.12514220026708))) + (("am") * (0.176493157719668))) + (("cyl") * (-1.5102456624971))
Skip to content This repository Search Pull requests Issues Marketplace Explore @edgararuiz Sign out Unwatch 9 Star 5 Fork 5 rstudio/db.rstudio.com Code Issues 6 Pull requests 0 Projects 0 Wiki Insights Settings Tree: 7a7548589f Find file Copy pathdb.rstudio.com/themes/hugo-material-docs/layouts/partials/footer_js.html 7a75485 on Apr 22, 2017 @edgararuiz edgararuiz Fix to theme's scrollspy 1 contributor RawBlameHistory 84 lines (73 sloc) 2.83 KB © 2018 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub API Training Shop Blog About