Learn R Programming

relSim (version 1.0.0)

randomSample: Generate a random sample of related (or unrelated) pairs of people

Description

Generate a random sample of unrelated, full-sib, or parent/child pairs of profiles at a single locus.

Usage

randomSample(nLoc, Freqs, rel = "UN", N = 10000)

Value

An N by 4 matrix of random profiles. The first two columns represent the genotype of person one and the second two columns represent the genotype of column two. Note that the random profiles do not use the orginal allele designations.

Arguments

nLoc

The locus number to sample from

Freqs

A list containg elements loci and freqs. freqs is a list of vectors containing the frequencies at the given loci.

rel

One of 'UN', 'FS', or 'PC' for unrelated, full-sib, or parent/child pairs respectively.

N

The sample size

Author

James M. Curran

See Also

randomProfile, randomSib, randomChild

Examples

Run this code

data(fbiCaucs)
G = randomSample(1, fbiCaucs, "FS", 100)

Run the code above in your browser using DataLab