Nothing

```
context("nsim")
test_that("nsim returns a single, double value", {
expect_length(
nsim(alpha = 0.05, sigma = 1, delta = 1, power = 0.5),
n = 1
)
expect_type(
nsim(alpha = 0.05, sigma = 1, delta = 1, power = 0.5),
type = "double"
)
})
test_that("alpha is in the appropriate range", {
expect_error(
nsim(alpha = 1.5, sigma = 1, delta = 1, power = 0.5),
"Variable 'alpha': .+ <= 1",
fixed = FALSE
)
expect_error(
nsim(alpha = -0.1, sigma = 1, delta = 1, power = 0.5),
"Variable 'alpha': .+ >= 0",
fixed = FALSE
)
})
test_that("sigma is greater than zero", {
expect_error(
nsim(alpha = 0.05, sigma = -0.1, delta = 1, power = -0.1),
"Variable 'sigma': .+ >= 0",
fixed = FALSE
)
})
test_that("delta is greater than zero", {
expect_error(
nsim(alpha = 0.05, sigma = 1, delta = -0.1, power = -0.1),
"Variable 'delta': .+ >= 0",
fixed = FALSE
)
})
test_that("power is in the appropriate range", {
expect_error(
nsim(alpha = 0.05, sigma = 1, delta = 1, power = 1.5),
"Variable 'power': .+ <= 1",
fixed = FALSE
)
expect_error(
nsim(alpha = 0.05, sigma = 1, delta = 1, power = -0.1),
"Variable 'power': .+ >= 0",
fixed = FALSE
)
})
```

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.