# NOT RUN {
# }
# NOT RUN {
# ------------------------ association tests -----------------------------
set.seed(123)
library(statsExpressions)
# without counts data
statsExpressions::expr_contingency_tab(
  data = mtcars,
  x = am,
  y = cyl,
  paired = FALSE,
  nboot = 15
)
# ------------------------ goodness of fit tests ---------------------------
# for reproducibility
set.seed(123)
# with counts
expr_contingency_tab(
  data = as.data.frame(HairEyeColor),
  x = Eye,
  counts = Freq,
  ratio = c(0.2, 0.2, 0.3, 0.3)
)
# }
Run the code above in your browser using DataLab