writeResult: Write data and results to Excel

View source: R/writeResult.R

writeResultR Documentation

Write data and results to Excel

Description

This function produces an Excel document containing the genotype data and various LR tables.

Usage

writeResult(
  resultTable,
  pedigrees,
  linkageMap,
  markerData,
  outfile,
  notes = NULL,
  famname = NULL,
  hideEmpty = FALSE,
  settings = NULL,
  XML = NULL
)

Arguments

resultTable

A data frame.

pedigrees

A list of two ped objects.

linkageMap

A data frame.

markerData

A data frame.

outfile

The output file name.

notes

A character vector.

famname

The name of the input .fam file.

hideEmpty

A logical, indicating if untyped markers should be dropped.

settings

A list of KLINK settings to be included in the output

XML

Optional data from .xml file.

Examples


# Built-in dataset `paternity`
peds = paternity
map = norSTR::map50
mdata = markerSummary(peds)

# Result table
LRtab = linkedLR(pedigrees = peds, linkageMap = map, markerData = mdata, verbose = FALSE)

# Write to excel
tmp = paste0(tempfile(), ".xlsx")
writeResult(LRtab,
            pedigrees = peds,
            linkageMap = map,
            markerData = mdata,
            outfile = tmp)

# openxlsx::openXL(tmp)


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