Skip to content

Instantly share code, notes, and snippets.

@nutterb
Created January 20, 2017 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutterb/bcc3c04bc4c807cb9753f74820584cf5 to your computer and use it in GitHub Desktop.
Save nutterb/bcc3c04bc4c807cb9753f74820584cf5 to your computer and use it in GitHub Desktop.
dust_inline example
---
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