Created
January 20, 2017 17:18
-
-
Save nutterb/bcc3c04bc4c807cb9753f74820584cf5 to your computer and use it in GitHub Desktop.
dust_inline example
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
--- | |
title: "Untitled" | |
output: html_document | |
--- | |
```{r} | |
library(pixiedust) | |
fit <- lm(mpg ~ qsec * factor(gear) + factor(am), data = mtcars) | |
``` | |
The `qsec` term was not significant `r dust_inline(fit, term = c("qsec", "factor(gear)"), level = list("factor(gear)" = "4"))` | |
## Odds Ratio | |
```{r} | |
fit <- glm(am ~ qsec + mpg + wt, | |
data = mtcars) | |
``` | |
The `qsec` term was significant `r dust_inline(fit, term = "qsec", label = "OR", fun = exp)` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment