tests/testthat/test_1-4-1_samp.R

context("samp bug")

test_that("samp() size > length", {
  expect_false(anyNA(samp(1:7, size = 11L)))
  expect_equal(length(samp(5:7, size = 13L)), 13L)
  expect_equal(length(samp(5:7 + 0, size = 3L)), 3L)
})

Try the hutils package in your browser

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

hutils documentation built on April 13, 2022, 5:23 p.m.