View source: R/as.data.frame.linkdat.R
as.data.frame.linkdat | R Documentation |
Convert a linkdat object to data.frame for pretty printing.
## S3 method for class 'linkdat' as.data.frame( x, ..., famid = F, markers = seq_len(x$nMark), alleles = NULL, missing = NULL, singleCol = FALSE, sep = "" )
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
|
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
.
A data.frame
.
as.matrix.linkdat
x = linkdat(toyped) x # Printing x as above is equivalent to: as.data.frame(x, sep = '/', missing = '-', singleCol = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.