Learn R Programming

propr (version 2.0.1)

phit: Calculate proportionality metric phi.

Description

phit returns a propr object containing a measure of proportionality.

Usage

phit(counts, symmetrize = TRUE)

Arguments

counts
A data.frame or matrix. A "count matrix" with subjects as rows and features as columns.
symmetrize
A logical. If TRUE, forces symmetry by reflecting the "lower left triangle".

Value

Returns a propr object.

Details

Let d represent any number of features measured across n biological replicates subjected to a binary or continuous event E. For example, E could represent case-control status, treatment status, treatment dose, or time. This function converts a "count matrix" with n rows and d columns into a proportionality matrix of d rows and d columns containing phi measurements for each feature pair. One can think of the resultant matrix as equivalent to a distance matrix, except that it has no symmetry unless forced.

See Also

propr, propr-class, perb

Examples

Run this code
randomNum <- sample(1:1000, size = 25 * 10, replace = TRUE)
counts <- matrix(randomNum, nrow = 25, ncol = 10)
phi <- phit(counts, symmetrize = TRUE)

Run the code above in your browser using DataLab