Skip to content

Commit

Permalink
Merge pull request #266 from easystats/rc_0_8_9
Browse files Browse the repository at this point in the history
Prepare CRAN release
  • Loading branch information
strengejacke authored Oct 27, 2024
2 parents a690f60 + d20353a commit 38a93b7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
Type: Package
Package: modelbased
Title: Estimation of Model-Based Predictions, Contrasts and Means
Version: 0.8.8.1
Version: 0.8.9
Authors@R:
c(person(given = "Dominique",
family = "Makowski",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-5375-9967", Twitter = "@Dom_Makowski")),
comment = c(ORCID = "0000-0001-5375-9967")),
person(given = "Daniel",
family = "Lüdecke",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0002-8895-3206", Twitter = "@strengejacke")),
comment = c(ORCID = "0000-0002-8895-3206")),
person(given = "Mattan S.",
family = "Ben-Shachar",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0002-4287-4801", Twitter = "@mattansb")),
comment = c(ORCID = "0000-0002-4287-4801")),
person(given = "Indrajeet",
family = "Patil",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets")))
comment = c(ORCID = "0000-0003-1995-6531")))
Maintainer: Dominique Makowski <[email protected]>
Description: Implements a general interface for model-based estimations
for a wide variety of models, used in the computation of
Expand Down Expand Up @@ -69,7 +69,7 @@ VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Config/testthat/edition: 3
Config/testthat/parallel: true
Roxygen: list(markdown = TRUE)
Expand Down
6 changes: 2 additions & 4 deletions R/estimate_contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#'
#' @inherit estimate_slopes details
#'
#' @examplesIf require("emmeans", quietly = TRUE)
#' @examplesIf require("lme4", quietly = TRUE) && require("emmeans", quietly = TRUE) && require("rstanarm", quietly = TRUE)

Check warning on line 17 in R/estimate_contrasts.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/estimate_contrasts.R,line=17,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 123 characters.
#' \dontrun{
#' # Basic usage
#' model <- lm(Sepal.Width ~ Species, data = iris)
#' estimate_contrasts(model)
Expand Down Expand Up @@ -44,18 +45,15 @@
#' estimated <- estimate_contrasts(lm(Sepal.Width ~ Species, data = iris))
#' standardize(estimated)
#'
#' @examplesIf require("lme4", quietly = TRUE) && require("emmeans", quietly = TRUE)
#' # Other models (mixed, Bayesian, ...)
#' data <- iris
#' data$Petal.Length_factor <- ifelse(data$Petal.Length < 4.2, "A", "B")
#'
#' model <- lme4::lmer(Sepal.Width ~ Species + (1 | Petal.Length_factor), data = data)
#' estimate_contrasts(model)
#'
#' @examplesIf require("rstanarm", quietly = TRUE) && require("emmeans", quietly = TRUE)
#' library(rstanarm)
#'
#' \donttest{
#' data <- mtcars
#' data$cyl <- as.factor(data$cyl)
#' data$am <- as.factor(data$am)
Expand Down
8 changes: 6 additions & 2 deletions R/estimate_slopes.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ estimate_slopes <- function(model,
if (insight::model_info(model)$is_bayesian) {
trends <- parameters::parameters(estimated, ci = ci, ...)
trends <- .clean_names_bayesian(trends, model, transform = "none", type = "trend")
trends <- cbind(estimated@grid, trends)
trends[[".wgt."]] <- NULL # Drop the weight column
em_grid <- as.data.frame(estimated@grid)
em_grid[[".wgt."]] <- NULL # Drop the weight column
colums_to_add <- setdiff(colnames(em_grid), colnames(trends))
if (length(colums_to_add)) {
trends <- cbind(em_grid[colums_to_add], trends)
}
} else {
trends <- parameters::parameters(estimated, ci = ci, ...)
}
Expand Down
10 changes: 4 additions & 6 deletions man/estimate_contrasts.Rd

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

8 changes: 4 additions & 4 deletions man/modelbased-package.Rd

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

0 comments on commit 38a93b7

Please sign in to comment.