Skip to content

v0.1.0

Compare
Choose a tag to compare
@wwbrannon wwbrannon released this 15 Dec 07:02

The sqlscore package provides utilities for generating sql queries (particularly CREATE TABLE statements) from R model objects. The most important use case is generating SQL to score a GLM or related model represented as an R object, which is particularly when the amount of scoring data is very large.

This version includes:

  • Functions to generate CREATE TABLE and SELECT statements from model objects;
  • Functions for generating unevaluated R expressions from model objects that correspond to
    • the model's linear predictor
    • the model's final prediction expression (the resposne function of the linear predictor)
  • Support for built-in glm and lm objects, as well as
    • bayesglm from package:arm
    • cv.glmnet from package:glmnet
    • glmboost from package:mboost (only Gaussian models)
      Except for glmboost, all link functions that can be represented in SQL are supported for all packages.
  • Using a custom link function by name. This is useful if, e.g., your database provides probit or tobit functions.
  • Support for various formula features (in particular :, I() and model.matrix-style factor expansion).