tests/testthat/test-adaptSeq.R

# context("adapt_seq()")
testthat::test_that("Test adapt_seq", {
  output <- c(0, 0.174532925199433, 0.349065850398866, 0.436332312998582, 
              0.523598775598299, 0.610865238198015, 0.698131700797732, 0.785398163397448, 
              0.872664625997165, 0.959931088596881, 1.0471975511966, 1.13446401379631, 
              1.22173047639603, 1.30899693899575, 1.39626340159546, 1.48352986419518, 
              1.5707963267949, 1.65806278939461, 1.74532925199433, 1.83259571459405, 
              1.91986217719376, 2.00712863979348, 2.0943951023932, 2.18166156499291, 
              2.26892802759263, 2.35619449019234, 2.44346095279206, 2.53072741539178, 
              2.61799387799149, 2.70526034059121, 2.79252680319093, 2.96705972839036, 
              3.14159265358979)
  expect_equal(ignore_attr = TRUE, adapt_seq(0, pi, 25, sin), output)
})

Try the mosaic package in your browser

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

mosaic documentation built on Nov. 10, 2023, 1:11 a.m.