From eb5f3d8427ed528bd00190e9b85f2c8446a0c255 Mon Sep 17 00:00:00 2001 From: Stijn Date: Tue, 16 Nov 2021 10:29:28 +0000 Subject: [PATCH] Improve the documentation of perform_adonis --- R/getters.R | 14 ++++++++++---- man/perform_adonis.Rd | 18 ++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/R/getters.R b/R/getters.R index 3b9a994..c845409 100644 --- a/R/getters.R +++ b/R/getters.R @@ -317,11 +317,17 @@ abundances <- function(ta) ta$abundances #' Perform an adonis test #' -#' This function executes the adonis function of the vegan package and returns -#' the result. +#' This function executes the \link[vegan]{adonis} function of the vegan package +#' and returns the result. #' -#' Predictors should be a character vector. Samples where one of the predictors -#' is NA are removed. +#' Samples where one or more predictors are NA are removed. +#' +#' @param ta A tidyamplicons object. +#' @param predictors A character vector with predictors to include in the model. +#' @param permutations The number of permutations (more permutations takes +#' longer but gives a more accurate p-value). +#' +#' @return An object of class "adonis" (see \link[vegan]{adonis}). #' #' @export perform_adonis <- function(ta, predictors, permutations = 999) { diff --git a/man/perform_adonis.Rd b/man/perform_adonis.Rd index 4483bf0..242697e 100644 --- a/man/perform_adonis.Rd +++ b/man/perform_adonis.Rd @@ -6,11 +6,21 @@ \usage{ perform_adonis(ta, predictors, permutations = 999) } +\arguments{ +\item{ta}{A tidyamplicons object.} + +\item{predictors}{A character vector with predictors to include in the model.} + +\item{permutations}{The number of permutations (more permutations takes +longer but gives a more accurate p-value).} +} +\value{ +An object of class "adonis" (see \link[vegan]{adonis}). +} \description{ -This function executes the adonis function of the vegan package and returns -the result. +This function executes the \link[vegan]{adonis} function of the vegan package +and returns the result. } \details{ -Predictors should be a character vector. Samples where one of the predictors -is NA are removed. +Samples where one or more predictors are NA are removed. }