permute_restricted_cpp: (C++) Restricted Permutation of Cases Within Blocks

View source: R/RcppExports.R

permute_restricted_cppR Documentation

(C++) Restricted Permutation of Cases Within Blocks

Description

Divides a sequence or time series in blocks and permutes cases within these blocks. This function does not preserve rows, and should not be used if the sequence has dependent columns. Larger block sizes increasingly disrupt the data structure over time.

Usage

permute_restricted_cpp(x, block_size, seed = 1L)

Arguments

x

(required, numeric matrix). Numeric matrix to permute.

block_size

(optional, integer) block size in number of rows. Minimum value is 2, and maximum value is nrow(x).

seed

(optional, integer) random seed to use.

Value

numeric matrix

See Also

Other Rcpp_permutation: permute_free_by_row_cpp(), permute_free_cpp(), permute_restricted_by_row_cpp()


distantia documentation built on April 4, 2025, 5:42 a.m.