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

emmeans maybe a dependency not a suggested package? #78

Closed
davidjanke opened this issue Nov 26, 2019 · 6 comments
Closed

emmeans maybe a dependency not a suggested package? #78

davidjanke opened this issue Nov 26, 2019 · 6 comments

Comments

@davidjanke
Copy link

davidjanke commented Nov 26, 2019

Hi afex dev team,

We tried to install the afex package but that failed with the following error:
Error: package or namespace load failed for ‘afex’: .onLoad failed in loadNamespace() for 'afex', details: call: NULL error: '.emm_register' is not an exported object from 'namespace:emmeans'

Installing package lme4 mannually (as it was not installed as a dependency automatically) did not help, but installing emmeans did solve the issue, though it is listed as a suggested package.

Versions currently installed:
R 3.4.4
afex 0.25.1
lme4 1.1.21
emmeans 1.4.2
Running on Ubuntu 18.04.3 LTS

@singmann
Copy link
Owner

Hmm, that is probably due to an old R version. I cannot replicate with R 3.6.1 as shown below. And I fear there is not a lot of incentive to try to get this to work with such an old R version.

> library("afex")
Loading required package: lme4
Loading required package: Matrix
Registered S3 methods overwritten by 'car':
  method                          from
  influence.merMod                lme4
  cooks.distance.influence.merMod lme4
  dfbeta.influence.merMod         lme4
  dfbetas.influence.merMod        lme4
************
Welcome to afex. For support visit: http://afex.singmann.science/
- Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
- Methods for calculating p-values with mixed(): 'KR', 'S', 'LRT', and 'PB'
- 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
- NEWS: library('emmeans') now needs to be called explicitly!
- Get and set global package options with: afex_options()
- Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
- For example analyses see: browseVignettes("afex")
************

Attaching package: ‘afex’

The following object is masked from ‘package:lme4’:

    lmer

> library("emmeans")
Error in library("emmeans") : there is no package called ‘emmeans’
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_Switzerland.1252  LC_CTYPE=English_Switzerland.1252   
[3] LC_MONETARY=English_Switzerland.1252 LC_NUMERIC=C                        
[5] LC_TIME=English_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] afex_0.25-1   lme4_1.1-21   Matrix_1.2-17

loaded via a namespace (and not attached):
 [1] zip_2.0.4           Rcpp_1.0.2          plyr_1.8.4          compiler_3.6.1      pillar_1.4.2       
 [6] cellranger_1.1.0    nloptr_1.2.1        forcats_0.4.0       tools_3.6.1         boot_1.3-22        
[11] zeallot_0.1.0       gtable_0.3.0        tibble_2.1.3        nlme_3.1-140        lattice_0.20-38    
[16] pkgconfig_2.0.2     rlang_0.4.0         openxlsx_4.1.0.1    rstudioapi_0.10     parallel_3.6.1     
[21] curl_4.0            haven_2.1.1         rio_0.5.16          stringr_1.4.0       dplyr_0.8.3        
[26] vctrs_0.2.0         hms_0.5.1           tidyselect_0.2.5    lmerTest_3.1-0      grid_3.6.1         
[31] glue_1.3.1          data.table_1.12.6   R6_2.4.0            readxl_1.3.1        foreign_0.8-71     
[36] minqa_1.2.4         carData_3.0-2       reshape2_1.4.3      purrr_0.3.2         ggplot2_3.2.1      
[41] car_3.0-4           magrittr_1.5        scales_1.0.0        backports_1.1.4     MASS_7.3-51.4      
[46] splines_3.6.1       assertthat_0.2.1    abind_1.4-5         colorspace_1.4-1    numDeriv_2016.8-1.1
[51] stringi_1.4.3       lazyeval_0.2.2      munsell_0.5.0       crayon_1.3.4    

@davidjanke
Copy link
Author

Thanks for checking it out. If I have some time, I'll try to narrow it down if it is an issue with the old R version.

@natsrm
Copy link

natsrm commented Dec 4, 2019

Hi guys,
Just letting you know I just tried installing afex with R version 3.5.0 and this issue also happened to me. I re-installed with install.packages("afex", dependencies = T) and package emmeans was one of the many installed. If I try to load afex without loading emmeans, it still gives the same error, and if I try to load emmeans I get the following:
library(emmeans)
Error: package or namespace load failed for ‘emmeans’ in get(method, envir = home): lazy-load database 'C:/Users/Natii/Documents/R/win-library/3.5/emmeans/R/emmeans.rdb' is corrupt
In addition: Warning messages:
1: package ‘emmeans’ was built under R version 3.5.3
2: In get(method, envir = home) : internal error -5 in R_decompress1
So I guess the problem is R's version, as emmeans was built under version 3.5.3...

@singmann
Copy link
Owner

singmann commented Dec 4, 2019

Can you please post the full output of sessionInfo() for the situation in which the error occurs?

@natsrm
Copy link

natsrm commented Dec 4, 2019

I suppose this is the important part, or do you actually need all of it?
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

singmann added a commit that referenced this issue Mar 22, 2020
@singmann
Copy link
Owner

singmann commented Apr 7, 2024

the package currently works without emmeans (even though it is recommended for post-hoc analyses)

@singmann singmann closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants