permuteGrid: Permute rows, columns or whole grid matrix.

View source: R/dev-functions.r

permuteGridR Documentation

Permute rows, columns or whole grid matrix.

Description

Generate one or many permutations of the grid by shuffling the rows, the columns or the whole grid matrix.

Usage

permuteGrid(x, along = 1, n = 1)

Arguments

x

A repgrid object.

along

What to permute. along=1 (default) will permute the rows along=2 the columns, along=3 the whole matrix.

n

The number of permutations to produce.

Value

A repgrid object if n = 1 or a list of repgrid objects if n > 1.

Examples

## Not run: 

# permute grid
permuteGrid(bell2010)
permuteGrid(bell2010)
permuteGrid(bell2010)

# generate a list of permuted grids
permuteGrid(bell2010, n = 5)

## End(Not run)


markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.