Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: datawizard
Title: Easy Data Wrangling and Statistical Transformations
Version: 1.3.1.1
Version: 1.3.1.2
Authors@R: c(
person("Indrajeet", "Patil", , "patilindrajeet.science@gmail.com", role = "aut",
comment = c(ORCID = "0000-0003-1995-6531")),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ S3method(normalize,factor)
S3method(normalize,grouped_df)
S3method(normalize,matrix)
S3method(normalize,numeric)
S3method(plot,dw_groupmeans)
S3method(plot,dw_groupmeans_list)
S3method(plot,parameters_distribution)
S3method(plot,visualisation_recipe)
S3method(print,data_codebook)
Expand Down
19 changes: 17 additions & 2 deletions R/means_by_group.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#' is used to get p-values for each sub-group. P-values indicate whether each
#' group-mean is significantly different from the total mean.
#'
#' @note There is also a `plot()`-method implemented in the
#' [**see**-package](https://easystats.github.io/see/).
#'
#' @examples
#' data(efc)
#' means_by_group(efc, "c12hour", "e42dep")
Expand Down Expand Up @@ -124,7 +127,7 @@ means_by_group.numeric <- function(
attr(out, "var_grp_label") <- var_grp_label
attr(out, "digits") <- digits

class(out) <- c("dw_groupmeans", "data.frame")
class(out) <- c("dw_groupmeans", "see_dw_groupmeans", "data.frame")
out
}

Expand Down Expand Up @@ -181,7 +184,7 @@ means_by_group.data.frame <- function(
)
})

class(out) <- c("dw_groupmeans_list", "list")
class(out) <- c("dw_groupmeans_list", "see_dw_groupmeans_list", "list")
out
}

Expand Down Expand Up @@ -325,3 +328,15 @@ print.dw_groupmeans_list <- function(x, digits = NULL, ...) {
print(x[[i]], digits = digits, ...)
}
}

#' @export
plot.dw_groupmeans <- function(x, ...) {
insight::check_if_installed("see")
NextMethod()
}

#' @export
plot.dw_groupmeans_list <- function(x, ...) {
insight::check_if_installed("see")
NextMethod()
}
4 changes: 4 additions & 0 deletions man/means_by_group.Rd

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

Loading