readResults: Read a simulation result set from file

View source: R/readResults.R

readResultsR Documentation

Read a simulation result set from file

Description

This function will read the output from sim that has been saved to disk

Usage

readResults(
  N = 0,
  rel = "UN",
  gzip = TRUE,
  strPath = "",
  strVer = "",
  fileName = NULL
)

Arguments

N

The number of iterations in the simulation

rel

'UN' = unrelated, 'FS' = full-sib, 'PC' = parent-child

gzip

If TRUE then it is assumed that the file is compressed

strPath

Optional location of files. Must terminate with / otherwise it will not work

strVer

A version string, useful if more than simulation has been run

fileName

This argument allows the user to override the default file naming conventions of the result file

Details

The arguments to this file are used to generate the input file name. The format is very rigid, being 'results-sim-rel-N(-strVer).csv(.gz)' That is, if strVer is something than an empty string then it is included after the number of interations. Similarly if gzip == TRUE then the filename is assumed to end with '.gz'

Value

a data frame with three columns labelled sib, pc, and ibs. These represent the LRs for sibs and parent-child calculated on each simulated profile pair, and the number of matching alleles (IBS).

Author(s)

James M. Curran

See Also

sim

Examples


data(fbiCaucs)
## not run
## write the results of 100 unrelated profile pairs to
## results-sim-UN-100.csv.gz
## and read it back in
## Not run: 
sim(100, save = T)
unrel = readResults(100)
sim(100, rel = "FS", strVer = "01", save = T)
sibs = readResults(100, rel = "FS", strVer = "01")

## End(Not run)


relSim documentation built on Aug. 29, 2023, 9:07 a.m.