Learn R Programming

simfam (version 1.1.6)

draw_sex: Draw sex values randomly for a list of individuals

Description

Each individual has their sex drawn between male and female with equal probability. Sex is encoded numerically following the convention for plink FAM files (see below).

Usage

draw_sex(n)

Value

The length-n vector of integer sex assignments: 1L corresponds to male, 2L to female.

Arguments

n

The number of individuals.

See Also

Examples

Run this code
draw_sex( 10 )

Run the code above in your browser using DataLab