tests/testthat/test_getGVPopulation.R

#' Copyright(c) 2017-2024 R. Mark Sharp
#' This file is part of nprcgenekeepr
context("getGVPopulation")
library(testthat)
data("smallPed")
ped <- smallPed
ped$population <- getGVPopulation(ped, NULL)
test_that("getGVPopulation correctly sets the correct IDs in the population", {
  ped$population <- getGVPopulation(ped, NULL)
  expect_identical(ped$id[ped$population], ped$id)
  ped$population <- getGVPopulation(ped, c("A", "C"))
  expect_true(all(ped$id[ped$population] %in% c("A", "C")))
})

Try the nprcgenekeepr package in your browser

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

nprcgenekeepr documentation built on June 8, 2025, 10:55 a.m.