# NOT RUN {
# for reproducibility
set.seed(123)
library(jmv)
# with counts
subtitle_onesample_proptest(
data = as.data.frame(HairEyeColor),
main = Eye,
counts = Freq,
ratio = c(0.2, 0.2, 0.3, 0.3)
)
# in case of no variation, only sample size will be shown
subtitle_onesample_proptest(
data = cbind.data.frame(x = rep("a", 10)),
main = x
)
# }
Run the code above in your browser using DataCamp Workspace