R: An R Package for Extended Behavior Genetics Analysis

# An R Package for Extended Behavior Genetics Analysis

## Documentation for package ‘BGmisc’ version 1.4.3.1

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

.assignParentValue | Assign parent values based on component type
.computeTranspose | Compute the transpose multiplication for the relatedness matrix
.loadOrComputeIsChild | Load or compute the isChild matrix
.postProcessGedcom.legacy | Post-process GEDCOM Data Frame
addParentRow | Create a properly formatted parent row for the pedigree
addPersonToPed | addPersonToTree A function to add a new person to an existing pedigree 'data.frame'.
addRowlessParents | Add addRowlessParents
allGens | calcAllGens A function to calculate the number of individuals in each generation. This is a supporting function for 'simulatePedigree'.
applyTagMappings | Apply Tag Mappings to a Line
ASOIAF | A pedigree of ice and fire
buildBetweenGenerations | Process Generation Connections
buildWithinGenerations | Process Generations for Pedigree Simulation
calcAllGens | calcAllGens A function to calculate the number of individuals in each generation. This is a supporting function for 'simulatePedigree'.
calcFamilySize | calcFamilySize A function to calculate the total number of individuals in a pedigree given parameters. This is a supporting function for function 'simulatePedigree'
calcFamilySizeByGen | calcFamilySizeByGen An internal supporting function for 'simulatePedigree'.
calculateCIs | Calculate Confidence Intervals for Correlation Coefficients
calculateH | Falconer's Formula
calculateRelatedness | Calculate Relatedness Coefficient
checkIDs | Validates and Optionally Repairs Unique IDs in a Pedigree Dataframe
checkIDuniqueness | Check for duplicated individual IDs
checkParentIDs | Validates and Optionally Repairs Parent IDs in a Pedigree Dataframe
checkParentSex | Check Parental Role Sex Consistency
checkPedigreeNetwork | Validate Pedigree Network Structure
checkSex | Validates and Optionally Repairs Sex Coding in a Pedigree Dataframe
checkWithinRowDuplicates | Check for within-row duplicates (self-parents, same mom/dad)
collapseNames | collapse Names
com2links | Convert Sparse Relationship Matrices to Kinship Links
comp2vech | comp2vech Turn a variance component relatedness matrix into its half-vectorization
computeParentAdjacency | Compute Parent Adjacency Matrix with Multiple Approaches
countPatternRows | Count GEDCOM Pattern Rows
createGenDataFrame | Create Data Frame for Generation
determineSex | Determine Sex of Offspring
dropLink | dropLink A function to drop a person from his/her parents in the simulated pedigree 'data.frame'. The person can be dropped by specifying his/her ID or by specifying the generation which the randomly to-be-dropped person is in. The function can separate one pedigree into two pedigrees. Separating into small pieces should be done by running the function multiple times. This is a supplementary function for 'simulatePedigree'.
evenInsert | evenInsert A function to insert m elements evenly into a length n vector.
famSizeCal | calcFamilySize A function to calculate the total number of individuals in a pedigree given parameters. This is a supporting function for function 'simulatePedigree'
findBiggest | This function finds the biggest families in a pedigree. It is supposed to be used internally by the 'summarize_pedigree' function.
findOldest | This function finds the oldest families in a pedigree. It is supposed to be used internally by the 'summarize_pedigree' function.
fitComponentModel | fitComponentModel Fit the estimated variance components of a model to covariance data
hazard | Simulated pedigree with two extended families and an age-related hazard
identifyComponentModel | identifyComponentModel Determine if a variance components model is identified
inbreeding | Artificial pedigree data on eight families with inbreeding
initializeRecord | Initialize an Empty Individual Record
insertEven | evenInsert A function to insert m elements evenly into a length n vector.
isChild | Determine isChild Status, isChild is the 'S' matrix from RAM
makeInbreeding | makeInbreeding A function to create inbred mates in the simulated pedigree 'data.frame'. Inbred mates can be created by specifying their IDs or the generation the inbred mate should be created. When specifying the generation, inbreeding between siblings or 1st cousin needs to be specified. This is a supplementary function for 'simulatePedigree'.
makeTwins | makeTwins A function to impute twins in the simulated pedigree 'data.frame'. Twins can be imputed by specifying their IDs or by specifying the generation the twin should be imputed. This is a supplementary function for 'simulatePedigree'.
mapFAMS2parents | Create a Mapping from Family IDs to Parent IDs
markPotentialChildren | Mark and Assign children
parseNameLine | Parse a Full Name Line
ped2add | Take a pedigree and turn it into an additive genetics relatedness matrix
ped2ce | Take a pedigree and turn it into an extended environmental relatedness matrix
ped2cn | Take a pedigree and turn it into a common nuclear environmental relatedness matrix
ped2com | Take a pedigree and turn it into a relatedness matrix
ped2fam | Segment Pedigree into Extended Families
ped2graph | Turn a pedigree into a graph
ped2maternal | Add a maternal line ID variable to a pedigree
ped2mit | Take a pedigree and turn it into a mitochondrial relatedness matrix
ped2mt | Take a pedigree and turn it into a mitochondrial relatedness matrix
ped2paternal | Add a paternal line ID variable to a pedigree
postProcessGedcom | Post-process GEDCOM Data Frame
potter | Fictional pedigree data on a wizarding family
processEventLine | Process Event Lines (Birth or Death)
processParents | Process Parents Information from GEDCOM Data
readGed | Read a GEDCOM File
readGedcom | Read a GEDCOM File
readgedcom | Read a GEDCOM File
readWikifamilytree | Read Wiki Family Tree
recodeSex | Recodes Sex Variable in a Pedigree Dataframe
related_coef | Calculate Relatedness Coefficient
repairIDs | Repair Missing IDs
repairParentIDs | Repair Parent IDs
repairSex | Repairs Sex Coding in a Pedigree Dataframe
resample | Resample Elements of a Vector
royal92 | Royal pedigree data from 1992
SimPed | Simulate Pedigrees This function simulates "balanced" pedigrees based on a group of parameters: 1) k - Kids per couple; 2) G - Number of generations; 3) p - Proportion of males in offspring; 4) r - Mating rate.
simulatePedigree | Simulate Pedigrees This function simulates "balanced" pedigrees based on a group of parameters: 1) k - Kids per couple; 2) G - Number of generations; 3) p - Proportion of males in offspring; 4) r - Mating rate.
sizeAllGens | calcFamilySizeByGen An internal supporting function for 'simulatePedigree'.
splitIndividuals | Split GEDCOM Lines into Individual Blocks
standardizeColnames | Standardize Column Names in a Dataframe (Internal)
summariseFamilies | Summarize the families in a pedigree
summariseMatrilines | Summarize the maternal lines in a pedigree
summarisePatrilines | Summarize the paternal lines in a pedigree
summarisePedigrees | Summarize Pedigree Data
summarizeFamilies | Summarize the families in a pedigree
summarizeMatrilines | Summarize the maternal lines in a pedigree
summarizePatrilines | Summarize the paternal lines in a pedigree
summarizePedigrees | Summarize Pedigree Data
traceTreePaths | Trace paths between individuals in a family tree grid
validate_and_convert_matrix | validate_and_convert_matrix
vech | vech Create the half-vectorization of a matrix