tests/testthat/test_constructors.R

context("constructor tests")

test_that("genind objects can be constructed with nothing", {
  skip_on_cran()
  gen <- genind()
  expect_that(gen, is_a("genind"))
  expect_true(is.genind(gen))
})

test_that("genpop objects can be constructed with nothing", {
  skip_on_cran()
  gen <- genpop()
  expect_that(gen, is_a("genpop"))
  expect_true(is.genpop(gen))
})

Try the adegenet package in your browser

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

adegenet documentation built on Feb. 16, 2023, 6 p.m.