https://github.com/cran/pracma
Tip revision: f0ba8a5d88ce30d08c8312fd9b882f2ff051d91b authored by Hans W. Borchers on 25 August 2018, 21:00:11 UTC
version 2.1.5
version 2.1.5
Tip revision: f0ba8a5
polyint.R
###
### polyint.R +++ Test suite +++
###
test.polyint <- function(input, expected) {
output <- do.call(getFromNamespace("polyint", "pracma"), input)
identical(output, expected)
}
polyint.expected.1 <- c(1, 0)
polyint.expected.2 <- c(1/6, 1/5, 1/4, 1/3, 1/2, 1, 1)
test.polyint(list(p=c(1)), polyint.expected.1)
test.polyint(list(p=c(1,1,1,1,1,1), k=1), polyint.expected.2)