library(testthat)
library(data.summary)
context("Sample Mean")
test_that("Calculated Correctly", {
x <- 1:10
expect_equal(sample_mean(x), 5.5)
y <- c( -3, 50, 5, -11, 4)
expect_equal(sample_mean(y), 9)
z <- rnorm(20)
expect_equal(sample_mean(z), mean(z))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.