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"))
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.
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()
.
Examples
Run this coderes = linkedLR(paternity)
getTotals(res)
addTotals(res)
Run the code above in your browser using DataLab