inst/extdata/example_analysis.R

library(tidyverse)
library(rms)

starwars %>%
  mutate(bmi = mass / ((height / 100) ^ 2)) %>%
  select(bmi, gender) -> starwars

dd <- datadist(starwars)
options(datadist = "dd")

mod <- ols(bmi ~ gender, data = starwars) %>%
  summary()

plot(mod)

Try the tidycode package in your browser

Any scripts or data that you put into this service are public.

tidycode documentation built on Dec. 11, 2019, 1:08 a.m.