Created
July 16, 2019 08:16
-
-
Save zappingseb/d1e4324f980d68b25c594fbd3c8593a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a linear model | |
model_reactive <- metaReactive2({ | |
validate(need(is.data.frame(data_set_reactive()), "Data Set could not be created")) | |
validate(need(is.language(formula_reactive()), "Formula could not be created from column selections")) | |
metaExpr(bindToReturn = TRUE, { | |
model_data <- !!data_set_reactive() | |
lm(formula = !!formula_reactive(), data = model_data) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment