read_phenotype: Read phenotype from .fam file

View source: R/read_phenotype.R

read_phenotypeR Documentation

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)

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?

Value

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


geneSLOPE documentation built on Aug. 16, 2023, 5:10 p.m.