Learn R Programming

geneSLOPE (version 0.38.2)

read_phenotype: Read phenotype from .fam file

Description

Reading phenotype data from file. It is assumed, that data is given in .fam file. In this format, first column is family id (FID), second is individual id (IID), third is Paternal individual ID (PAT), fourth is Maternal individual ID (MAT), fifth is SEX and sixth and last is PHENOTYPE. If file has only four columns, then it is assumed that PAT and MAT columns are missing. If there is only one column, then it is assumed that only phenotype is provided.

Usage

read_phenotype(filename, sep = " ", header = FALSE, stringAsFactors = FALSE)

Value

object of class phenotypeData. See the class documentation for details.

Arguments

filename

character, name of file with phenotype.

sep

character, field seperator in file.

header

logical, does first row of file contain variables names.

stringAsFactors

logical, should character vectors be converted to factors?