tests/testthat/test-compat-tidyr.R

context("test-compat-tidyr")

test_that("nest()", {

  x <- bootstrapify(iris, 5)

  expect_error(
    x_n <- nest(x),
    NA
  )

  expect_equal(
    x_n$.bootstrap,
    1:5
  )

  expect_equal(
    colnames(nest(x, .x = -.bootstrap)),
    c(".bootstrap", ".x")
  )

})

Try the strapgod package in your browser

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

strapgod documentation built on Sept. 20, 2019, 9:04 a.m.