inst/tinytest/test_column_sums.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}


result <- column_sums(iris)
expectation <- c(
  Sepal.Length = 876.5, Sepal.Width = 458.6,
  Petal.Length = 563.7, Petal.Width = 179.9
)
expect_equal(result, expectation, tolerance = 1e-3)

Try the fritools package in your browser

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

fritools documentation built on June 8, 2025, 11:59 a.m.