Learn R Programming

wgsea (version 1.8)

genperms: Generate permutations of a phenotype vector

Description

Given a vector, generate n.perm samples and return a matrix with each permutation in each column.

Usage

genperms(pheno, n.perm = 0)

Arguments

pheno
a vector to be permuted
n.perm
the number of times to permute

Value

a matrix with dimensions length(pheno) x n.perm.

Examples

Run this code
y <- rbinom(50,2,0.3)
genperms(y,4)

Run the code above in your browser using DataLab