satisfies_constraints: Test constraints on a graph

satisfies_constraintsR Documentation

Test constraints on a graph

Description

This function tests whether a graph satisfies a number of different types of constraints

Usage

satisfies_constraints(
  graph,
  nonzero_f4 = NULL,
  admix_constraints = NULL,
  event_order = NULL
)

Arguments

graph

An admixture graph

nonzero_f4

A data frame or matrix with four columns. One row for each f4-statistic which is observed to be significantly non-zero

admix_constraints

A data frame with columns pop, min, max

event_order

A data frame with columns earlier1, earlier2, later1, later2

Value

TRUE if all admixture constraints are satisfied, else FALSE

See Also

satisfies_numadmix, satisfies_zerof4, satisfies_eventorder ## Not run: # At least one admixture event for C, and none for D: constrain_cd = tibble(pop = c('C', 'D'), min = c(1, NA), max = c(NA, 0)) satisfies_numadmix(random_admixturegraph(5, 2), constrain_cd) ## End(Not run)


uqrmaie1/admixtools documentation built on April 25, 2024, 11:30 a.m.