Nothing
test_that("Test suite aad",{ # testing arith ANY vf methods
expect_close <- function(x,y){expect_true(all(abs(x-y) < 1e-8))}
testANYmethod <- function(vf1,val,x){
usevf <- c(
(vf1 + val)(x), (vf1 * val)(x), (vf1 - val)(x), (vf1 / val)(x),
(val + vf1)(x), (val * vf1)(x), (val - vf1)(x), (val / vf1)(x)
)
usebr <- c(
vf1(x) + val, vf1(x) * val, vf1(x) - val, vf1(x) / val,
val + vf1(x), val * vf1(x), val - vf1(x), val / vf1(x)
)
expect_close(usevf,usebr)
}
f <- as.vf(function(x){x^2 + 1})
g <- as.vf(function(x){1/x})
testANYmethod(f, 2:10, 1.3)
testANYmethod(Sin, 2:10, 1.3)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.