formatSummary: Format final summary table

View source: R/formatSummary.R

formatSummaryR Documentation

Format final summary table

Description

Combines and harmonises summary tables from different DVI analyses

Usage

formatSummary(dfs, orientation = c("AM", "PM"), columns = NULL, dvi = NULL)

Arguments

dfs

A list of data frames.

orientation

Either "AM" or "PM", controlling column order and sorting.

columns

A (optional) character vector with column names in the wanted order.

dvi

A dviData object used for sorting. Note that if given, this must contain all victims and families.

Details

The default column order is controlled by orientation, which the following effect:

  • AM:

    • Column order: Family, Missing, Sample, LR, GLR, Conclusion, Comment

    • Sort by: Family and Missing

  • PM:

    • Column order: Sample, Missing, Family, LR, GLR, Conclusion, Comment

    • Sort by: Sample

Columns (in any of the data frames) other than these are simply ignored.

Value

A data frame.

Examples

u = findUndisputed(planecrash)
a = amDrivenDVI(u$dviReduced, threshold2 = 500)

u$summary
a$summary

formatSummary(list(u$summary, a$summary$AM))
formatSummary(list(u$summary, a$summary$PM), orientation = "PM", dvi = planecrash)


dvir documentation built on Sept. 11, 2024, 7:03 p.m.