setfam: replace the pedigree data frame

setfamR Documentation

replace the pedigree data frame

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

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

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 May 29, 2024, 1:14 a.m.