Learn R Programming

pooledpeaks (version 1.1.1)

JostD: Calculate Jost's D

Description

This function calculates Jost's D measure from a gene identity matrix.

Usage

JostD(J = matrix, pairwise = TRUE)

Value

If pairwise = TRUE, returns a matrix of pairwise Jost's D values. If pairwise = FALSE, returns the overall Jost's D value.

Arguments

J

A gene identity matrix.

pairwise

Logical indicating whether to calculate pairwise Jost's D. If pairwise=FALSE, must not have any missing data.

Examples

Run this code
gene_identity_matrix <- matrix(c(
0.3164550, 0.2836333, 0.2760485,
0.2836333, 0.3106084, 0.2867215,
0.2760485, 0.2867215, 0.3338663
), nrow = 3, byrow = TRUE,
dimnames = list(paste0("Sample", 1:3), paste0("Sample", 1:3)))

JostD(J=gene_identity_matrix, pairwise=TRUE)
JostD(J=gene_identity_matrix, pairwise=FALSE)

Run the code above in your browser using DataLab