setfam {Mega2R} | R 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 |
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
[Package Mega2R version 1.1.0 Index]