sim_facs: Simulate FACS data

View source: R/sim_facs.R

sim_facsR Documentation

Simulate FACS data

Description

Simulate FACS data

Usage

sim_facs(m, n_obs = 10, jp = NULL)

Arguments

m

A matrix with condition asrownames, elements as colnames, and probabilities of observing an element as values.

n_obs

Number of observations per condition to simulate

jp

An optional list of matrices, the same length as nrow(m) with the joint probabilities of elements

Examples

elements <- as.character(1:10)
conditions <- letters[1:2]
# randomly generate probability of elements
probabilities <-
  sapply(elements, function(x) {
    p <- runif(length(conditions))
    setNames(round(p, 1), nm = conditions)
  })
sim_facs(probabilities)

NetFACS documentation built on Dec. 7, 2022, 1:12 a.m.