Description Usage Arguments Value Examples
Compile an R model to a valid TSQL formula
1 |
model |
A list with the same signature as the output of |
modify_scipen |
A boolean indicating whether to modify the "scipen" option to avoid generating invalid SQL |
A character string representing a SQL model formula
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | a <- 1:10
b <- 2*1:10
c <- as.factor(a)
df <- data.frame(a, b, c)
formula = b ~ a + c
# A vanilla linear model
linear_model <- lm(formula, data = df)
modelc::modelc(linear_model)
# A generalized linear model with gamma family distribution and log link function
gamma_loglink_model <- glm(formula, data = df, family=Gamma(link="log"))
modelc::modelc(gamma_loglink_model)
# A generalized linear model with gamma family distribution and identity link function
gamma_idlink_model <- glm(formula, data = df, family=Gamma(link="identity"))
modelc::modelc(gamma_idlink_model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.