Skip to content

Commit

Permalink
Merge github.com:/easystats/insight
Browse files Browse the repository at this point in the history
  • Loading branch information
bbolker committed Jun 12, 2024
2 parents 0c36061 + bd78d2c commit a594631
Show file tree
Hide file tree
Showing 95 changed files with 1,468 additions and 950 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# never used to avoid accidentally restoring a cache containing a suggested
# dependency.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/R-CMD-check-main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
uses: easystats/workflows/.github/workflows/R-CMD-check-main.yaml@main
2 changes: 0 additions & 2 deletions .github/workflows/R-CMD-check-strict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#
# R CMD Check will fail on a `NOTE`.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-all-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#
# This workflow helps find such failing examples that need to be modified.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-link-rot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-spelling.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-styling.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-test-warnings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Running tests with options(warn = 2) to fail on test warnings
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-vignette-warnings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Running tests with options(warn = 2) to fail on test warnings
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/html-5-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pkgdown-no-suggests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

Expand Down
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.19.9
Date: 2024-03-15 15:07:43 UTC
SHA: a2cb3065be697a9573a0134258a3fea6c0df3bb9
Version: 0.20.1
Date: 2024-06-11 14:53:20 UTC
SHA: 622b973d4f2c62cb42d6fc4b4c04907533096fcb
26 changes: 12 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: insight
Title: Easy Access to Model Information for Various Model Objects
Version: 0.19.9.2
Version: 0.20.1.1
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down Expand Up @@ -70,19 +70,19 @@ Description: A tool to provide an easy, intuitive and consistent
used to fit the model or data from response variables. 'insight'
mainly revolves around two types of functions: Functions that find
(the names of) information, starting with 'find_', and functions that
get the underlying data, starting with 'get_'. The package has a
get the underlying data, starting with 'get_'. The package has a
consistent syntax and works with many different model objects, where
otherwise functions to access these information are missing.
License: GPL-3
URL: https://easystats.github.io/insight/
BugReports: https://github.com/easystats/insight/issues
Depends:
Depends:
R (>= 3.6)
Imports:
Imports:
methods,
stats,
utils
Suggests:
Suggests:
AER,
afex,
aod,
Expand All @@ -93,7 +93,7 @@ Suggests:
betareg,
bife,
biglm,
blavaan,
blavaan (>= 0.5-5),
blme,
boot,
brms,
Expand Down Expand Up @@ -129,7 +129,9 @@ Suggests:
gmnl,
grDevices,
gt,
httptest2,
httr,
httr2,
interp,
ivreg,
JM,
Expand All @@ -142,8 +144,8 @@ Suggests:
lmtest,
logistf,
logitr,
MASS,
marginaleffects,
MASS,
Matrix,
mclogit,
mclust,
Expand All @@ -156,7 +158,6 @@ Suggests:
mgcv,
mice,
mlogit,
mhurdle,
mmrm,
modelbased,
multgee,
Expand All @@ -180,9 +181,9 @@ Suggests:
Rcpp,
rmarkdown,
rms,
rpart,
robustbase,
robustlmm,
rpart,
rstanarm (>= 2.21.1),
rstantools (>= 2.1.0),
rstudioapi,
Expand All @@ -195,9 +196,9 @@ Suggests:
survival,
testthat,
tinytable (>= 0.1.0),
TMB,
truncreg,
tweedie,
TMB,
VGAM,
withr
VignetteBuilder:
Expand All @@ -208,7 +209,4 @@ RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/Needs/website:
rstudio/bslib,
r-lib/pkgdown,
easystats/easystatstemplate
Config/Needs/website: easystats/easystatstemplate
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ S3method(format_ci,bayestestR_ci)
S3method(format_ci,character)
S3method(format_ci,data.frame)
S3method(format_ci,factor)
S3method(format_ci,logical)
S3method(format_ci,numeric)
S3method(format_string,character)
S3method(format_string,data.frame)
Expand Down Expand Up @@ -388,6 +389,7 @@ S3method(get_data,clm2)
S3method(get_data,clmm)
S3method(get_data,clmm2)
S3method(get_data,complmrob)
S3method(get_data,coxme)
S3method(get_data,coxph)
S3method(get_data,cpglmm)
S3method(get_data,data.frame)
Expand Down
47 changes: 44 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@
# insight 0.20.2

## General

* Improved accuracy of singularity-checks in `get_variance()`.

# insight 0.20.1

## Bug fixes

* Fixed possible memory allocation issues when the deprecated argument `at` was
used in `get_datagrid()`.

# insight 0.20.0

## Breaking

* Arguments named `group`, `at`, `group_by` and `split_by` will be deprecated
in future releases of _easystats_ packages. Please use `by` instead. This
affects following functions in *insight*:

* `export_table()`
* `get_datagrid()`
* `print_parameters()`

## Bug fixes

* Fixed errors in CRAN checks.

# insight 0.19.11

## General

* More informative error message for `get_varcov()` when the requested
`vcov`-function failed.

## Bug fixes

* Fixed issue with `get_data()` for `coxme` models when `source` was set to
`"modelframe"`.

# insight 0.19.10

## Bug fixes

* Function like `find_variables()` or `clean_names()` now support multi-membership
* Functions like `find_variables()` or `clean_names()` now support multi-membership
formulas for models from *brms*.

* Updated tests to work with the latest changes in *glmmTMBM 1.1.9*.
* Updated tests to work with the latest changes in *glmmTMB 1.1.9*.

# insight 0.19.9

Expand Down Expand Up @@ -1397,4 +1438,4 @@
* Fixed issue in `get_data()` for models with `cbind()`-response variables and
matrix-like variables in the model frame (e.g. when using `poly()`).

* Fixed issues with `PROreg::BBmm()`, due to changes in latest package update.
* Fixed issues with `PROreg::BBmm()`, due to changes in latest package update.
2 changes: 1 addition & 1 deletion R/clean_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ clean_names.character <- function(x, include_names = FALSE, ...) {
if (grepl("::", x[i], fixed = TRUE)) {
x[i] <- sub("(.*)::(.*)", "\\2", x[i])
}
if (pattern[j] == "offset") {
if (pattern[j] == "offset") { # nolint
x[i] <- trim_ws(unique(sub("^offset\\(([^-+ )]*).*", "\\1", x[i])))
} else if (pattern[j] == "I") {
if (!ignore_asis) x[i] <- trim_ws(unique(sub("I\\(((\\w|\\.)*).*", "\\1", x[i])))
Expand Down
5 changes: 4 additions & 1 deletion R/compute_variances.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
## Major revisions and adaption to more complex models and other packages
## by Daniel Lüdecke

# needed for singularity check
check_if_installed("performance", reason = "to check for singularity")

faminfo <- model_info(x, verbose = FALSE)

if (any(faminfo$family == "truncated_nbinom1")) {
Expand All @@ -36,7 +39,7 @@

# Test for non-zero random effects ((near) singularity)
no_random_variance <- FALSE
if (.is_singular(x, vals, tolerance = tolerance) && !(component %in% c("slope", "intercept"))) {
if (performance::check_singularity(x, tolerance = tolerance) && !(component %in% c("slope", "intercept"))) {
if (verbose) {
format_warning(
sprintf("Can't compute %s. Some variance components equal zero. Your model may suffer from singularity (see `?lme4::isSingular` and `?performance::check_singularity`).", name_full),

Check warning on line 45 in R/compute_variances.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/compute_variances.R,line=45,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 189 characters.
Expand Down
Loading

0 comments on commit a594631

Please sign in to comment.