Nothing
## Copyright(c) 2017-2026 R. Mark Sharp
## This file is part of nprcgenekeepr
#' Identify the founders in a pedigree
#'
#' Part of Pedigree Curation
#'
#' A founder is an animal whose sire and dam are both unknown (\code{NA}).
#' Animals with exactly one known parent (partial parentage) are
#' \strong{not} founders.
#'
#' @param ped a pedigree \code{data.frame} with (at least) the columns
#' \code{sire} and \code{dam}.
#' @return A logical vector with one element per row of \code{ped} that is
#' \code{TRUE} for each animal whose sire and dam are both \code{NA}. The
#' result never contains \code{NA}.
#'
#' @seealso \code{\link{getFounders}} for the founder \code{id} values.
#' @export
#' @examples
#' library(nprcgenekeepr)
#' ped <- data.frame(
#' id = c("A", "B", "C", "D", "E", "F", "G"),
#' sire = c(NA, NA, "A", "A", NA, "D", "D"),
#' dam = c(NA, NA, "B", "B", NA, "E", "E"),
#' stringsAsFactors = FALSE
#' )
#' isFounder(ped)
isFounder <- function(ped) {
is.na(ped$sire) & is.na(ped$dam)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.