shuffle.locations: Permute the rows and columns of a square matrix.

View source: R/dists.R

shuffle.locationsR Documentation

Permute the rows and columns of a square matrix.

Description

Returns the given matrix with rows and columns permuted in the same order.

Usage

shuffle.locations(m, perm = sample.int(dim(m)[1]))

Arguments

m

a matrix with an equal number of rows and columns

perm

vector of indices specifying the new order of rows/columns

Value

a matrix of the same size as m


kevinstadler/cultevo documentation built on Jan. 13, 2024, 11:22 p.m.