tests/testthat/test_getOffspring.R

#' Copyright(c) 2017-2024 R. Mark Sharp
#' This file is part of nprcgenekeepr
context("getOffspring")
library(testthat)
data("smallPed")
test_that("getOffspring returns the correct IDs", {
  expect_identical(
    getOffspring(smallPed, ids = c("A", "B")),
    c("C", "D", "H", "I", "M")
  )
  expect_identical(
    getOffspring(smallPed, ids = c("M")),
    "P"
  )
  expect_identical(
    getOffspring(smallPed, ids = c("Q")),
    "A"
  )
})

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.