powered by
This methods applies permutations column-wise on the coe of any Coe object but relies on a function that can be used on any matrix. For a Coe object, it uses sample on every column (or row) with (or without) replacement.
coe
perm(x, ...)# S3 method for default perm(x, margin = 2, size, replace = TRUE, ...)# S3 method for Coe perm(x, size, replace = TRUE, ...)
# S3 method for default perm(x, margin = 2, size, replace = TRUE, ...)
# S3 method for Coe perm(x, size, replace = TRUE, ...)
a Coe object of same class
the object to permute
useless here
numeric whether 1 or 2 (rows or columns)
numeric the required size for the final object, same size by default.
logical, whether to use sample with replacement
Other farming: breed()
breed()
m <- matrix(1:12, nrow=3) m perm(m, margin=2, size=5) perm(m, margin=1, size=10) bot.f <- efourier(bot, 12) bot.m <- perm(bot.f, 80) bot.m
Run the code above in your browser using DataLab