context("Just testing printer functionality")
test_that("Whether printer gives us the same output",{
set.seed(1)
res = printer(x=rnorm(5), r = rnorm(5))
expect_equal(nrow(res), 5)
cm =colMeans(res) # the line c(x...) is generated by dput(colMeans)
# when generate the following line, remebver to keep same order after the set.seed(1)
# should be the first run
expect_equal(cm, c(x = 0.129269895004571, r = 0.135135667587365))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.