Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_variance() returns NULL when R package site is built via github actions #928

Open
matschmitz opened this issue Sep 9, 2024 · 1 comment
Labels
3 investigators ❔❓ Need to look further into this issue

Comments

@matschmitz
Copy link

matschmitz commented Sep 9, 2024

When building the site of a simple testing R package locally and rendering the article, the insight::get_variance() function works as expected. However, when building the site via GitHub Actions, the function returns NULL.

Steps to Reproduce:

Locally, render the following code in an article and observe that get_variance() works correctly:

library(pkgtest)
library(brms)
library(insight)

mdl <- brms::brm(mpg ~ hp + (1 | cyl), data = mtcars, cores = 4)

insight::get_variance(mdl)
#> $var.fixed 
#> [1] 4.873527 

#> $var.random
#> [1] 22.39223 

#> $var.residual 
#> [1] 8.502559 
#> attr(,"class") 
#> [1] "insight_aux" "numeric"

#> $var.distribution 
#> [1] 8.502559 
#> attr(,"class") #> [1] "insight_aux" "numeric"

#> $var.dispersion 
#> [1] 0 
#> $var.intercept 
#> cyl
#> 22.39223 

When the same article is rendered via GitHub Actions, the result of get_variance() is NULL

Local Build:

  • OS: Windows 10 x64
  • R version: 4.4.1 (2024-06-14 ucrt)
  • insight: 0.20.4 (CRAN)
  • brms: 2.21.0

GitHub Actions:

  • OS: Ubuntu 22.04.4 LTS
  • R version: 4.4.1
  • insight: 0.20.4 (CRAN)
  • brms: 2.21.0

There may be an environment or package dependency issue specific to GitHub Actions.

@strengejacke
Copy link
Member

As a workaround, does it help if you provide the null-model (using the null_model argument)?

@strengejacke strengejacke added the 3 investigators ❔❓ Need to look further into this issue label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 investigators ❔❓ Need to look further into this issue
Projects
None yet
Development

No branches or pull requests

2 participants