add_graph_f4_sign: Extend a data frame with f_4 statistics predicted by a graph.

Description Usage Arguments Details Value

View source: R/signs.R

Description

Extracts the sign for the f_4 statistics predicted by the graph for all rows in a data frame and extends the data frame with the graph f_4.

Usage

1

Arguments

data

The data frame to get the labels to compute the f_4 statistics from.

graph

The admixture graph.

Details

The data frame, data, must contain columns W, X, Y, and Z. The function then computes the sign of the f4(W, X; Y, Z) statistics for all rows and adds these as a column, graph_f4_sign, to the data frame.

Value

A data frame identical to data except with an additional column, graph_f4_sign, containing the sign of the f_4 statistics as determined by the graph.


mailund/admixture_graph documentation built on April 3, 2018, 9:28 p.m.