cond_net: Conditional probability network.

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/cond_net.R

Description

Generates a matrix of conditional probabilities for a set of co-occurrences.

Usage

1

Arguments

x

A matrix of species co-occurrences with species in columns and observations in rows.

Value

Returns a matrix of conditional probabilities for a set of species.

Note

This is primarily a low-level function used by coNet, it may be of interest to more advanced users who would like to directly compute the conditional probabilities from a set of co-occurrences.

Author(s)

Matthew K. Lau

See Also

coNet, cond_prob to See Also as help, ~~~

Examples

1
2
3
4
5
6
A <- c(1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1)
B <- c(1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1)
C <- c(1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1)
D <- c(0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0)
M <- data.frame(A, B, C, D)
cond_net(M)

ECGen/coNet documentation built on Sept. 14, 2019, 5:24 a.m.