Commit f3382025 by Eric Coissac

Patch documentation of .getPermutateMatrix

parent 6a79139b
......@@ -6,6 +6,11 @@ NULL
#' Generate permutation matrix according to a schema.
#'
#' The permutation schema is defined using the `how` function.
#' The implementation of this function is inspired
#' from the VEGAN package and reproduced here to avoid an extra
#' dependency on an hidden vegan function.
#'
#' @param permutations a list of control values for the permutations as returned
#' by the function \code{\link[permute]{how}}, or the number of
#' permutations required.
......@@ -18,11 +23,6 @@ NULL
#' @note Internal function do not use.
#'
#' @rdname internal.getPermuteMatrix
#' The permutation schema is defined using the `how` function.
#' The implementation of this function is inspired
#' from the VEGAN package and reproduced here to avoid an extra
#' dependency on an hidden vegan function.
#'
.getPermuteMatrix = function(permutations, n, strata = NULL)
{
if (length(permutations) == 1) {
......@@ -30,7 +30,7 @@ NULL
}
if (!missing(strata) && !is.null(strata)) {
if (inherits(permutations, "how") && is.null(permute::getBlocks(permutations)))
permute::setBlocks(permutations) <- strata
setBlocks(permutations) <- strata
}
if (inherits(permutations, "how"))
permutations <- permute::shuffleSet(n, control = permutations)
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/corls_test.R
\name{.getPermuteMatrix}
\alias{.getPermuteMatrix}
\title{Generate permutation matrix according to a schema.}
\usage{
.getPermuteMatrix(permutations, n, strata = NULL)
}
\arguments{
\item{permutations}{a list of control values for the permutations as returned
by the function \code{\link[permute]{how}}, or the number of
permutations required.}
\item{n}{numeric; the number of observations in the sample set.
May also be any object that nobs knows about;
see \code{\link[permute]{nobs}} methods.}
\item{strata}{A factor, or an object that can be coerced to a
factor via as.factor, specifying the strata for permutation.}
}
\description{
The permutation schema is defined using the `how` function.
The implementation of this function is inspired
from the VEGAN package and reproduced here to avoid an extra
dependency on an hidden vegan function.
}
\note{
Internal function do not use.
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment