mastoffel / rptR

R package to estimate repeatabilities (intra-class coefficients) for Gaussian and non-Gaussian data.
16 stars 1 forks source link

Error when running tests: `function 'chm_factor_ldetL2' not provided by package 'Matrix'` #10

Open barracuda156 opened 7 months ago

barracuda156 commented 7 months ago

@mastoffel Incompatible with current version of Matrix?

* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-rptR/R-rptR/work/rptR/rptR.Rcheck’
* using R version 4.3.2 (2023-10-31)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
    GNU Fortran (MacPorts gcc12 12.3.0_3+stdlib_flag) 12.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘rptR/DESCRIPTION’ ... OK
* this is package ‘rptR’ version ‘0.9.22’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘rptR’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: ‘methods’
  All declared Imports should be used.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘rptR-Ex.R’ failed
The error most likely occurred in:

> ### Name: rpt
> ### Title: Repeatability Estimation for Gaussian and Non-Gaussian Data
> ### Aliases: rpt
> ### Keywords: models
> 
> ### ** Examples
> 
> # load data
> data(BeetlesBody)
> data(BeetlesMale)
> data(BeetlesFemale)
> 
> #  prepare proportion data
> BeetlesMale$Dark <- BeetlesMale$Colour
> BeetlesMale$Reddish <- (BeetlesMale$Colour-1)*-1
> BeetlesColour <- aggregate(cbind(Dark, Reddish) ~ Treatment + Population + Container, 
+      data=BeetlesMale, FUN=sum)
> 
> # Note: nboot and npermut are set to 0 for speed reasons. Use larger numbers
> # for the real analysis.
> 
> # gaussian data (example with a single random effect)
> rpt(BodyL ~ (1|Population), grname="Population", data=BeetlesBody, 
+      nboot=0, npermut=0, datatype = "Gaussian")
Error in initializePtr() : 
  function 'chm_factor_ldetL2' not provided by package 'Matrix'
Calls: rpt ... initialize -> <Anonymous> -> initializePtr -> .Call
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... ERROR
  Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
    2.   └─rptR::rptGaussian(...)
    3.     └─lme4::lmer(formula, data = data)
    4.       ├─base::do.call(...)
    5.       └─lme4 (local) `<fn>`(...)
    6.         ├─base::do.call(...)
    7.         └─methods (local) `<rfMthdDf>`(...)
    8.           └─methods::new(def, ...)
    9.             ├─methods::initialize(value, ...)
   10.             └─methods::initialize(value, ...)
   11.               └─.Object$initialize(...)
   12.                 └─lme4 (local) initializePtr()

  [ FAIL 13 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... NONE
  ‘rptR.Rmd’ using ‘UTF-8’... OK
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: 2 ERRORs, 1 NOTE
mastoffel commented 17 hours ago

Hi @barracuda156, thanks for this and sorry for the late reply. It seems like Matrix < 1.6-2 and Matrix >= 1.6-2 are binary incompatible, and this is a problem between Matrix and lme4. I think this should work when you re-installlme4, see here for details.

barracuda156 commented 17 hours ago

@mastoffel Thank you, then perhaps it might just work now, I should try again.

mastoffel commented 17 hours ago

Yes, let me know if it doesn't!