tests/testthat/test-curve-dist.R

test_that("`curve_dist()` works", {
  N <- 4
  betas <- fdasrvf::beta[, , 1, 1:N]
  out <- curve_dist(
    beta = betas,
    mode = "O",
    alignment = FALSE,
    rotation = FALSE,
    scale = FALSE,
    include.length = FALSE,
    lambda = 0.0
  )
  expect_equal(attr(out$Da, "Size"), N)
  out <- curve_dist(
    beta = betas,
    mode = "O",
    alignment = TRUE,
    rotation = FALSE,
    scale = FALSE,
    include.length = FALSE,
    lambda = 0.0
  )
  expect_equal(attr(out$Da, "Size"), N)
  out <- curve_dist(
    beta = betas,
    mode = "O",
    alignment = FALSE,
    rotation = TRUE,
    scale = FALSE,
    include.length = FALSE,
    lambda = 0.0
  )
  expect_equal(attr(out$Da, "Size"), N)
  out <- curve_dist(
    beta = betas,
    mode = "O",
    alignment = FALSE,
    rotation = FALSE,
    scale = TRUE,
    include.length = FALSE,
    lambda = 0.0
  )
  expect_equal(attr(out$Da, "Size"), N)
  out <- curve_dist(
    beta = betas,
    mode = "O",
    alignment = FALSE,
    rotation = FALSE,
    scale = TRUE,
    include.length = TRUE,
    lambda = 0.0
  )
  expect_equal(attr(out$Da, "Size"), N)
})

Try the fdasrvf package in your browser

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

fdasrvf documentation built on Oct. 5, 2024, 1:08 a.m.