writePed {pedtools} | R Documentation |
Write a pedigree to file
Description
Write a pedigree to file
Usage
writePed(
x,
prefix,
what = "ped",
famid = is.pedList(x),
header = TRUE,
merlin = FALSE,
verbose = TRUE
)
Arguments
x |
A |
prefix |
A character string giving the prefix of the files. For
instance, if |
what |
A subset of the character vector |
famid |
A logical indicating if family ID should be included as the
first column in the ped file. The family ID is taken from |
header |
A logical indicating if column names should be included in the
ped file. This option is ignored if |
merlin |
A logical. If TRUE, "ped", "map", "dat" and "freq" files are written in a format readable by the MERLIN software. In particular MERLIN requires non-numerical allele labels in the frequency file. |
verbose |
A logical. |
Value
A character vector with the file names.
Examples
x = nuclearPed(1)
x = addMarker(x, "3" = "a/b", name = "m1")
# Write to file
fn = writePed(x, prefix = tempfile("test"))
# Read
y = readPed(fn)
stopifnot(identical(x, y))