bad_parents: Determines of the indicated parent can possibly be the parent...

Description Usage Arguments Value

View source: R/bad_parents.R

Description

This function takes a data.frame full of parents and offspring and checks to see if the offspring are actually assigned to a compatible adult.

Usage

1
bad_parents(df, AdultID = "ID", OffID = "OffID", verbose = FALSE)

Arguments

df

A data.frame with identification and locus columns.

AdultID

The column header for id of the adults. All adults have unique identification numbers and all offspring have the the same number as the maternal/paternal individual from which they were sampled or are being compared. Default = "ID"

OffID

A column indicating offspring identification numbers. By default all adults have OffID=0 (this is how I tell if they are really adults and not offspring), and all offspring have OffID != 0. Default = "OffID"

verbose

Print out mismatched parent/offspring pairs.

Value

The data.frame with a new column, Is.Parent with values of TRUE/FALSE/NA (the NA is for adults).


MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.