BGmisc1.3.2 package

An R Package for Extended Behavior Genetics Analysis

BGmisc-package

BGmisc: An R Package for Extended Behavior Genetics Analysis

buildBetweenGenerations

Process Generation Connections

readGedcom

Read a GEDCOM File

allGens

allGens A function to calculate the number of individuals in each gene...

assignCoupleIds

Assign Couple IDs

assignParentIDs

Assign momID and dadID based on family mapping

adjustKidsPerCouple

Generate or Adjust Number of Kids per Couple Based on Mating Rate

buildWithinGenerations

Process Generations for Pedigree Simulation

calculateH

Falconer's Formula

calculateRelatedness

Calculate Relatedness Coefficient

calculateSummaryDT

This function calculates summary statistics for all numeric variables ...

checkIDs

Validates and Optionally Repairs Unique IDs in a Pedigree Dataframe

identifyComponentModel

identifyComponentModel Determine if a variance components model is ide...

checkSex

Validates and Optionally Repairs Sex Coding in a Pedigree Dataframe

combine_columns

Combine Columns

comp2vech

comp2vech Turn a variance component relatedness matrix into its half-v...

countPatternRows

Check for Pattern Rows

createFamilyToParentsMapping

Create a mapping of family IDs to parent IDs

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 simul...

efunc

Error Function

evenInsert

evenInsert A function to insert m elements evenly into a length n vect...

extract_info

Extract Information from Line

famSizeCal

famSizeCal A function to calculate the total number of individuals in ...

findFounder

This function finds the originating member for each line in a pedigree...

fitComponentModel

fitComponentModel Fit the estimated variance components of a model to ...

inferRelatedness

Infer Relatedness Coefficient

makeInbreeding

makeInbreeding A function to create inbred mates in the simulated pedi...

makeTwins

makeTwins A function to impute twins in the simulated pedigree `data.f...

markPotentialChildren

Mark and Assign children

Null

Compute the null space of a matrix

nullToNA

nullToNA

ped2add

Take a pedigree and turn it into an additive genetics relatedness matr...

ped2ce

Take a pedigree and turn it into an extended environmental relatedness...

ped2cn

Take a pedigree and turn it into a common nuclear environmental relate...

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

ped2paternal

Add a paternal line ID variable to a pedigree

plotPedigree

plotPedigree A wrapped function to plot simulated pedigree from functi...

processParents

Process parents information

recodeSex

Recodes Sex Variable in a Pedigree Dataframe

related_coef

related_coef (Deprecated)

relatedness

relatedness (Deprecated)

repairIDs

Repair Missing IDs

repairSex

Repairs Sex Coding in a Pedigree Dataframe

resample

Resample Elements of a Vector

rmvn

rmvn

SimPed

SimPed (Deprecated)

simulatePedigree

Simulate Pedigrees This function simulates "balanced" pedigrees based ...

sizeAllGens

sizeAllGens An internal supporting function for simulatePedigree.

standardizeColnames

Standardize Column Names in a Dataframe (Internal)

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

try_na

modified tryCatch function

vech

vech Create the half-vectorization of a matrix

The BGmisc R package offers a comprehensive suite of functions tailored for extended behavior genetics analysis, including model identification, calculating relatedness, pedigree conversion, pedigree simulation, and more.

  • Maintainer: S. Mason Garrison
  • License: GPL-3
  • Last published: 2024-06-18