Description Usage Arguments Value Author(s) References Examples

The `phicoef`

function calculates the "phi coefficient" between
two binary variables.

1 |

`x, y` |
Two logical vectors of the same length.
If |

The "phi coefficient" between the two binary variables. This is a single numeric value ranging from -1 to +1.

H. Pag<c3><a8>s

http://en.wikipedia.org/wiki/Phi_coefficient

1 2 3 4 5 6 7 8 9 10 | ```
set.seed(33)
x <- sample(c(TRUE, FALSE), 100, replace=TRUE)
y <- sample(c(TRUE, FALSE), 100, replace=TRUE)
phicoef(x, y)
phicoef(rep(x, 10), c(rep(x, 9), y))
stopifnot(phicoef(table(x, y)) == phicoef(x, y))
stopifnot(phicoef(y, x) == phicoef(x, y))
stopifnot(phicoef(x, !y) == - phicoef(x, y))
stopifnot(phicoef(x, x) == 1)
``` |

GenomicRanges documentation built on May 20, 2017, 9:41 p.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.