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

allUtils

Utility functions for complete enumeration of all possible permutations


Description

Utility functions to return the set of all permutations under different designs. For most practical applications, i.e. to combine designs permuting blocks and/or within blocks function allPerms will be required.

Usage

allFree(n, v = seq_len(n))

allSeries(n, nperms, mirror = FALSE)

allGrid(n, nperms, nr, nc, mirror, constant)

allStrata(n, control)

Arguments

n

the number of observations.

v

numeric; vector of indices. Default is 1:n.

nperms

numeric; number of possible permutations.

mirror

logical; mirroring of permutations allowed?

nr,nc

integer; number of rows and columns of grid designs.

constant

logical; same permutation within each block?

control

a list of control values describing properties of the permutation design, as returned by a call to how.

Details

These are utility functions and aren't designed for casual use. allPerms should be used instead.

Details on usage of these functions can be found in allPerms.

Value

A matrix of all possible permutations of n observations or of v, given the provided options.

Author(s)

Gavin Simpson


permute

Functions for Generating Restricted Permutations of Data

v0.9-5
GPL-2
Authors
Gavin L. Simpson [aut, cph, cre] (<https://orcid.org/0000-0002-9084-8413>), R Core Team [cph], Douglas M. Bates [ctb], Jari Oksanen [ctb]
Initial release
2019-03-10

We don't support your browser anymore

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