Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.data.frame.linkdat

linkdat to data.frame conversion


Description

Convert a linkdat object to data.frame for pretty printing.

Usage

## S3 method for class 'linkdat'
as.data.frame(x, ..., famid = F,
  markers = seq_len(x$nMark), alleles = NULL, missing = NULL,
  singleCol = FALSE, sep = "")

Arguments

x

a linkdat object.

...

further arguments (not used).

famid

a logical indicating if the family identifier should be included as the first column.

markers

a numeric indicating which markers should be included/printed.

alleles

a character containing allele names, e.g. alleles=c('A','B').

missing

the character (of length 1) used for missing alleles. Defaults to '0'.

singleCol

a logical: Should the two alleles for each marker be pasted into one column or kept in separate columns?

sep

a single character to be used as allele separator if singleCol=TRUE.

Details

This function is mainly intended for pretty-printing linkdat objects (for instance it is called by print.linkdat). For direct manipulation of the pedigree and/or marker matrices, it is better to use as.matrix.linkdat.

Value

A data.frame.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

x = linkdat(toyped)
x

# Printing x as above is equivalent to:
as.data.frame(x, sep = '/', missing = '-', singleCol = TRUE)

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.