tests/testthat/test-production.R

test_that("production pfres works", {

  PROFLUX <- readRDS(test_path("fixtures", "base_proflux.rds"))

  PROD <- production(PROFLUX)

  expect_equal(nrow(PROD), 48)
  expect_equal(round(PROD$prod_abs[5], 3), 0.149)
  expect_equal(round(PROD$prod_rel[15], 3), 0.079)

})

test_that("production fgres works", {

  base_dat <- readRDS(test_path("fixtures", "base_dat.rds"))

  FLUX <- fg_flux(base_dat)

  PROD <- production(FLUX)

  expect_equal(nrow(PROD), 48)
  expect_equal(round(PROD$prod_abs[5], 3), 2.434)
  expect_equal(round(PROD$prod_rel[15], 3), 0.945)

})

Try the ConFluxPro package in your browser

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

ConFluxPro documentation built on Aug. 8, 2025, 7:01 p.m.