test_that("Scaling theta from inf. and back works", {
expect_equal(scaleThetaFromInf(-5, 3, 0), -1)
expect_equal(scaleThetaToInf(-10, 100, 45), 0)
# back and forth since functions are inverses
expect_equal(scaleThetaToInf(0, 100,
scaleThetaFromInf(0, 100, c(1, 2, 3))),
c(1, 2, 3))
expect_equal(scaleThetaFromInf(-50, -3.5,
scaleThetaToInf(-50, -3.5, c(-10, -50, -8.5))),
c(-10, -50, -8.5))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.