as.data.frame.linkdat {paramlink} | R Documentation |
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 |
... |
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.
|
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
|
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
.
See Also
Examples
x = linkdat(toyped)
x
# Printing x as above is equivalent to:
as.data.frame(x, sep = '/', missing = '-', singleCol = TRUE)