Learn R Programming

KLINK (version 1.0.2)

writeResult: 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,
  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.

settings

A list of KLINK settings to be included in the output

XML

Optional data from .xml file.

Examples

Run this code
# \donttest{
# Built-in dataset `paternity`
peds = paternity
map = LINKAGEMAP
mdata = markerSummary(peds)

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

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

# openxlsx::openXL(tmp)
# }

Run the code above in your browser using DataLab