Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

snpStats

SnpMatrix and XSnpMatrix classes and methods

v1.40.0
GPL-3
Authors
David Clayton <dc208@cam.ac.uk>
Initial release
2019-10-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.