Description Usage Arguments Value Author(s) See Also Examples
Reads a ped file into R and creates a data frame in ped format, or transform the ped file into a matrix in genotype format.
1 2 |
file |
the filename (if necessary with path) of a ped file that should be read into R. |
first.row |
logical indicating whether the first row of |
coded |
a character string stating how the alleles of the SNPs are coded. Possible values are |
naVal |
value or character string specifying how missing values in the SNP data are coded. |
sep |
character string specifying how the SNP names in the first row of |
p2g |
logical indicating whether the ped file should be transformed into a matrix in genotype format. If |
non.rs.IDs |
logical indicating whether (some of) the SNP names are specified by other names than rs-IDs. |
cols4ID |
logical indicating whether columns should be added to output matrix containing the family ID and the individual ID.
If |
A data frame in ped format (if p2g = FALSE
), or a matrix in genotype format (if p2g = TRUE
).
Holger Schwender, holger.schwender@udo.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# Assuming there is a ped-file called pedfile.ped in the
# R working directory, this file can be read into R by
ped <- read.pedfile("pedfile.ped")
# The resulting data frame is in the typical ped format
# which needs to be transformed into the genotype format
# for applications of most of the functions in the trio
# package. This transformation can be done by
geno <- ped2geno(ped)
# This transformation can also be done directly when
# reading the ped-file into R by
geno2 <- read.pedfile("pedfile.ped", p2g = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.