sprinkle_missing_data: Adds missing data to a genotype dataset.

View source: R/utility.R

sprinkle_missing_dataR Documentation

Adds missing data to a genotype dataset.

Description

Adds missing data to a genotype dataset.

Usage

sprinkle_missing_data(
  x,
  missing_dist = function(x) {     missing_dist <- rnorm(x, mean = 0.05, sd = 0.02)    
    missing_dist[missing_dist < 0] <- 0     return(missing_dist) },
  missing_code = -9
)

Arguments

x

object coercable to numeric matrix containing genotype calls. Rows are loci, columns are samples. Each sample should be the genotype for a gene copy


hemstrow/GeneArchEst documentation built on June 10, 2025, 5:06 a.m.