Description Usage Arguments Value Examples
Test if samples are coming from a specific mean. Not guaranteed to be exact, as it estimates the standard error from the sample.
1 | expect_mc_iid_mean(object, mean, control = NULL)
|
object |
A function taking one argument - that generates n univariate iid samples. |
mean |
The expected mean of the samples returned from object. |
control |
a list controlling the algorithm
|
The first argument, invisibly, to allow chaining of expectations.
1 2 3 | sampler <- function(n) rbinom(n,prob=0.6,size=5)
expect_mc_iid_mean(sampler, mean=3)
testthat::expect_error(expect_mc_iid_mean(sampler, mean=2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.