Skip to content

Commit

Permalink
docs, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed May 13, 2024
1 parent 84036e7 commit f3da4b4
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 39 deletions.
15 changes: 8 additions & 7 deletions R/mann_whitney_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
#' @param select Name(s) of the continuous variable(s) (as character vector)
#' to be used as samples for the test. `select` can be one of the following:
#'
#' - `select` specifies **one** variable and `by` is provided to indicate the
#' groups of comparison. In this case, the samples in `select` are split by
#' the groups in `by`.
#' - `select` can be used in combination with `by`, in which case `select` is
#' the name of the continous variable (and `by` indicates a grouping factor).
#' - `select` can also be a character vector of length two or more (more than
#' two names only apply to `kruskal_wallis_test()`), in which case the two
#' continuous variables are treated as samples to be compared. `by` must be
#' `NULL` in this case.
#' - If `select` select is of length **two** and `paired = TRUE`, the two samples
#' are considered as *dependent* and a paired test is carried out.
#' - If `select` specifies **one** variable and `by = NULL`, a one-sample test
#' is carried out (only applicable for `t_test()` and `wilcoxon_test()`).
#' - If `select` specifies **two** variables and `by` is `NULL`, the two
#' samples are compared. In combination with `paired`, a paired test is
#' carried out, i.e. samples are considered as *dependent*.
#'
#' @param by Name of the variable indicating the groups. Required if `select`
#' specifies only one variable that contains all samples to be compared in the
#' test. If `by` is not a factor, it will be coerced to a factor. For
Expand Down
2 changes: 1 addition & 1 deletion R/wilcoxon_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' # one-sample test
#' wilcoxon_test(mtcars, "mpg")
#' # base R equivalent
#' suppressWarning(wilcox.test(mtcars$mpg ~ 1))
#' suppressWarnings(wilcox.test(mtcars$mpg ~ 1))
#'
#' # paired test
#' wilcoxon_test(mtcars, c("mpg", "hp"))
Expand Down
14 changes: 8 additions & 6 deletions man/chi_squared_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions man/kruskal_wallis_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions man/mann_whitney_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions man/t_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions man/wilcoxon_test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f3da4b4

Please sign in to comment.