tests/testthat/test_x3p_average.R

context("x3p_average")


test_that("x3p_average works as expected", {
  x3ptest_avg <- x3p_average(x3ptest, b = 5)
  x3ptest_avg$surface.matrix <- round(x3ptest_avg$surface.matrix,1)
  
  expect_equivalent(
    x3ptest_avg$surface.matrix, 
    matrix(data = c(3.4, 2, 3.8, 2.9), byrow=TRUE, nrow=2)
  )
  
})

Try the x3ptools package in your browser

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

x3ptools documentation built on Nov. 27, 2021, 1:06 a.m.