setfam: replace the pedigree data frame

Description Usage Arguments Value Examples

Description

You should first modify the fam data frame to filter the members you need to remove. (For example, you might want to delete members that have an unknown case/control status.) This function takes a new data frame of pedigree information and replaces the fam data frame in the 'environment' with it. Additionally, changing fam data frame will filter the genotypes data frame to only contain persons matching those in the fam data frame. setfam also filters for the phenotype data records.

Usage

1
setfam(fam, envir = ENV)

Arguments

fam

data frame of family information filtered from fam data frame (generated by mkfam).

envir

an 'environment' that contains all the data frames created from the SQLite database.

Value

None

Examples

1
2
3
4
5
6
7
8
9
db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = read.Mega2DB(db)

fam = mkfam()
# remove founders
fam = fam[ !( (fam[ , 5] == fam[ , 6]) & (fam[ , 5] == 0)), ]
setfam(fam)

ENV$fam

Mega2R documentation built on Dec. 11, 2021, 9:12 a.m.