Nothing
library(testthat)
test_that("sortRcpp is equal to sort in R: ", {
x <- round(rnorm(100) * 100, 0)
y <- sapply(x, function(i) i) # to make deep copy
sortRcpp(x)
expect_equal(x, sort(y))
})
test_that("Newton/Steffensen Method works:", {
# test utils
g <- function(x) {
return(x^3 - 27)
}
# success with initial value == 0.3
optim <- (newton(0.3, g))$x
expect_equal(round(optim[length(optim)], 4), 3)
expect_error(steffensen(0.3, g))
# success with initial value == 1
optim <- (steffensen(1., g))$x
expect_equal(round(optim[length(optim)], 4), 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.