countFirstOrder: Count first-order relatives.

Description Usage Arguments Details Value Examples

View source: R/countFirstOrder.R

Description

Part of Relations

Usage

1
countFirstOrder(ped, ids = NULL)

Arguments

ped

: 'Pedigree' Standardized pedigree information in a table.

ids

character vector of IDs or NULL These are the IDs to which the analysis should be restricted. First-order relationships will only be tallied for the listed IDs and will only consider relationships within the subset. If NULL, the analysis will include all IDs in the pedigree.

Details

Tallies the number of first-order relatives for each member of the provided pedigree. If 'ids' is provided, the analysis is restricted to only the specified subset.

Value

A dataframe with column id, parents, offspring, siblings, and total. A table of first-order relationship counts, broken down to indicate the number of parents, offspring, and siblings that are part of the subset under consideration.

Examples

1
2
3
4
5
6
7
library(nprcgenekeepr)
ped <- nprcgenekeepr::lacy1989Ped
ids <- c("B", "D", "E", "F", "G")
countIds <- countFirstOrder(ped, ids)
countIds
count <- countFirstOrder(ped, NULL)
count

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.