snp_fake: Fake a "bigSNP"

View source: R/fake.R

snp_fakeR Documentation

Fake a "bigSNP"

Description

Fake a "bigSNP"

Usage

snp_fake(n, m)

Arguments

n

Number of individuals.

m

Number of SNPs.

Value

A new temporary bigSNP object representing n individuals and m SNPs. The genotype Filebacked Big Matrix is initialized with missing values.

Examples

(test <- snp_fake(5, 12))

# The genotype Filebackeg Big Matrix is initialized with missing values
G <- test$genotypes
G[]

# Modify the genotype `big.matrix`
G[] <- sample(as.raw(0:3), size = length(G), replace = TRUE)
G[]


bigsnpr documentation built on March 31, 2023, 10:37 p.m.