Wrap binom.test (test of Binomial/Bernoulli rate) from summary.

wrapBinomTestS(
  x,
  n,
  ...,
  p = NA,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

x

numeric scalar, number of successes.

n

numeric scalar, number of trials.

...

extra arguments passed to binom.test

p

number, hypothesized probability of success.

alternative

passed to binom.test

conf.level

passed to binom.test

Value

wrapped stat

See also

Examples

wrapBinomTestS(3, 7, p = 0.5)
#> [1] "Exact binomial test: (3/7=0.4286~c(0.95)[0.09899, 0.8159], two.sided 0.5; p=n.s.)."
wrapBinomTestS(300, 700, p = 0.5)
#> [1] "Exact binomial test: (300/700=0.4286~c(0.95)[0.3916, 0.4662], two.sided 0.5; p=0.0001785)."