permutations: Enumerate the Combinations or Permutations of the Elements of...

View source: R/crossover.R

permutationsR Documentation

Enumerate the Combinations or Permutations of the Elements of a Vector

Description

permutations enumerates the possible permutations. The function is forked and minified from gtools::permutations

Usage

permutations(n, r, v = 1:n)

Arguments

n

Size of the source vector

r

Size of the target vectors

v

Source vector. Defaults to 1:n

Value

Returns a matrix where each row contains a vector of length r.

Author(s)

Original versions by Bill Venables. Extended to handle repeats.allowed by Gregory R. Warnes

References

Venables, Bill. "Programmers Note", R-News, Vol 1/1, Jan. 2001. https://cran.r-project.org/doc/Rnews/

See Also

Other Helper Functions: dup_coords(), get_grids(), grid_area(), hexa_area(), isSpatial(), readintegerSel(), readinteger(), splitAt(), windata_format()


YsoSirius/windfarmGA documentation built on March 13, 2024, 8:37 a.m.