tests/testthat/test.vectorize.R

library(optim.functions)
context("vectorization argument passing")

# test_that("The vectorize function correctly passes additional arguments", {
#   test.func <- function(x, a) a+x
#   expect_equal(opt.vect(test.func, a=3)(1:5), 1:5 + 3)
#   expect_equal(opt.vect(test.func, a=3)(1), 4)
# })

Try the optim.functions package in your browser

Any scripts or data that you put into this service are public.

optim.functions documentation built on May 2, 2019, 9:57 a.m.