Usage
df2solar(df, dir, kinship, kin2.gz = "kin2.gz", sort.ped = TRUE)
Arguments
- df
- A data frame that containts both phenotype and pedigree data.
- dir
- A character with path to a directory, where SOLAR files to be created.
- kinship
- (optional) A kinship matrix to be exported.
- kin2.gz
- A character with file name of SOLAR file to store the kinship matrix.
- sort.ped
- Logical, indicating where pedigree IDs (FAM or FAMID) to be sorted.
The default value is TRUE.
Description
The function exports phenotype and pedigree data from R to SOLAR.
Details
The function (1) puts the data df
in SOLAR format, (2) separates it into
two parts, pedigree and phenotypes,
and then (3) expots both data sets in
the directory dir
.
Pedigree or ID variables are detected by matchIdNames
function.