Skip to content

Commit

Permalink
clean up tidy-method code
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jun 9, 2024
1 parent 0aa64ce commit 5e63b4d
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions WIP/tidy_easystats.R
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
#' @title Tidy methods for easystats-objects
#' @name tidy
#'
#' @description Tidy methods for easystats-objects. \code{tidy()} usually returns
#' the same data frame that was used as input, however, with broom-alike
#' column names.
#' @description Tidy methods for easystats-objects. `tidy()` usually returns
#' the same data frame that was used as input, however, with broom-alike
#' column names.
#'
#' @param x A data frame, as returned by functions from easystats-packages like \code{\link[parameters:model_parameters]{model_parameters()}} or \code{\link[effectsize:effectsize]{effectsize()}}.
#' @param x A data frame, as returned by functions from easystats-packages like
#' [`parameters:::model_parameters()`] or [`effectsize::effectsize()`].
#' @param ... Currently not used.
#'
#' @return \code{x}, with "standardized" column names (see \code{\link{standardize_names}}).
#' @return `x`, with "standardized" column names (see [`standardize_names()`]).
#'
#' @note Due to possible namespace conflicts with other packages that define
#' a generic \code{tidy()}-method, the lifecycle of this function is still
#' experimental, and there might be a chance that it will become defunct and
#' removed in a future update. If possible, the preferred and stable alternative
#' to \code{tidy()} for \emph**easystats**-objects is \code{\link{standardize_names}}.
#' a generic `tidy()`-method, the lifecycle of this function is still
#' experimental, and there might be a chance that it will become defunct and
#' removed in a future update. If possible, the preferred and stable alternative
#' to `tidy()` for \emph**easystats**-objects is `standardize_names()`.
#'
#' @examples
#' if (require("parameters")) {
#' model <- lm(mpg ~ wt + cyl, data = mtcars)
#' mp <- model_parameters(model)
#' @examplesIf require("parameters"))
#' model <- lm(mpg ~ wt + cyl, data = mtcars)
#' mp <- model_parameters(model)
#'
#' as.data.frame(mp)
#' tidy(mp)
#' }
#' as.data.frame(mp)
#' tidy(mp)
#' @export
tidy <- function(x, ...) {
UseMethod("tidy")
Expand Down

0 comments on commit 5e63b4d

Please sign in to comment.