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 fritools2 package in your browser

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

fritools2 documentation built on July 9, 2023, 7:07 p.m.