This function generates and evaluates admixture graphs in numgen iterations to find well fitting admixturegraphs.

graph_equations(
  graph,
  substitute = TRUE,
  nam = c("a", "e", "f"),
  return_everything = FALSE
)

Arguments

graph

An admixture graph

substitute

Should edge names be represented by shorter symbols?

nam

Symbols used to shorten edge names

Value

A list with two data frames: equations holds the equtions for all f2-statistics; coding has the mapping from edge names to edge symbols, which is used when substitute = TRUE