tests/testthat/test_phaseI.R

data("air")
air <- lapply(air, function(x) x[1:10, , drop = FALSE])
fun_covariates <- names(air)[names(air) != "NO2"]
mfdobj_x <- get_mfd_list(air[fun_covariates], lambda = 1e-2)
y <- rowMeans(air$NO2)

test_that("get outliers", {
  expect_error(get_sof_pc_outliers(y[1], mfdobj[1:4]))
  expect_warning(get_sof_pc_outliers(y, mfdobj_x))
  expect_no_error(get_outliers_mfd(mfdobj_x[,1]))
})

Try the funcharts package in your browser

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

funcharts documentation built on Sept. 8, 2023, 6:04 p.m.