tests/testthat/test-create_resample.R

test_that("create_resample creates a list of outputs equal in 
            lenght to reps", {
  rs <- create_resample(BCI, reps = 10)
  expect_equal(length(rs), 10)
  expect_type(rs, "list")
})

test_that("Each data frame in the list has the same number of rows 
            as the original data set", {
  rs <- create_resample(BCI, reps = 10)
  for (i in seq_len(length(rs))) {
    expect_equal(nrow(rs[[i]]), nrow(BCI))
  }
})

Try the biosampleR package in your browser

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

biosampleR documentation built on Sept. 14, 2023, 1:07 a.m.