Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 11, 2023
1 parent 35334bc commit a435719
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/means_by_group.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ means_by_group.data.frame <- function(x,
if (is.null(data$weights) || all(data$weights == 1)) {
fit <- stats::lm(x ~ group, data = data)
} else {
fit <- stats::lm(x ~ group, weights = weights, data = data)
fit <- stats::lm(x ~ group, weights = data$weights, data = data)
}

# summary table data
Expand Down Expand Up @@ -224,6 +224,9 @@ format.dw_groupmeans <- function(x, digits = NULL, ...) {
if (is.null(digits)) {
digits <- attr(x, "digits", exact = TRUE)
}
if (is.null(digits)) {
digits <- 2
}
insight::format_table(x, digits = digits, ...)
}

Expand Down

0 comments on commit a435719

Please sign in to comment.