Skip to contents

Simulate Independent Genotypes

Usage

sim_geno_indep(n, p, min_maf = 0.01, max_maf = 0.4, scale = FALSE)

Arguments

n

Sample size.

p

Number of SNPs.

min_maf

Minimum minor allele frequency.

max_maf

Maximum minor allele frequency.

scale

Logical, whether to scale the data.

Value

A matrix of genotypes.

Examples

sim_geno_indep(n = 100, p = 10, min_maf = 0.01, max_maf = 0.4, scale = TRUE)
#> Error in map2_dfc(.x = mafs, .y = rep(n, p), ~rbinom(.y, size = 2, prob = .x)): The package "dplyr" is required for `map2_dfc()`.