Learn R Programming

solarius (version 0.3.0.2)

df2solar: Export phenotype and pedigree data into SOLAR files

Description

The function exports phenotype and pedigree data from R to SOLAR.

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.

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.