snpStats (version 1.22.0)

random.snps: Generate random SnpMatrix

Description

This function is purely for testing purposes. It can generate SnpMatrix objects which contain more than 2^31-1 elements.

Usage

random.snps(nrows, ncols)

Arguments

nrows
The number of rows to be generated
ncols
The number of columns to be generated

Details

All SNPs should be in Hardy-Weinberg equilibrium with an allele frequency of 0.5.

Note that, although the total number of elements can exceed 2^31-1, the numbers of rows and columns are still subject to this limit.

Examples

Run this code
x <- random.snps(100,10)
col.summary(x)

Run the code above in your browser using DataCamp Workspace