getTotals: Get LR totals

View source: R/addTotals.R

getTotalsR Documentation

Get LR totals

Description

Find, or add, the LR totals in a data frame with marker-wise LR values. The totals are found by multiplying the values in each column, after removing NA's.

Usage

getTotals(x, cols = c("LRlinked", "LRnolink", "LRnomut"))

addTotals(x, cols = c("LRlinked", "LRnolink", "LRnomut"))

Arguments

x

A data frame with LR results, typically the output of linkedLR().

cols

A vector of column names, by default c("LRlinked", "LRnolink", "LRnomut")

Details

Note that for the multiplication to respect linked markers, the input table should include LR values for only one marker in each linkage group, and NA's elsewhere. This is the format used by linkedLR().

Value

getTotals() returns a named numeric. addTotals returns a data frame equal to the input, but with a row of totals added at the bottom.

Examples

res = linkedLR(paternity)
getTotals(res)
addTotals(res)


KLINK documentation built on June 8, 2025, 11:42 a.m.