- using R Under development (unstable) (2025-09-11 r88813)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-3) 15.2.0
GNU Fortran (Debian 15.2.0-3) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘dynConfiR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘dynConfiR’ version ‘1.0.0’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/1s] OK
- 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 ‘dynConfiR’ can be installed ... OK
See the install log for details.
- used C++ compiler: ‘g++-15 (Debian 15.2.0-3) 15.2.0’
- checking package directory ... OK
- checking for future file timestamps ... 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 code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [18s/23s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... 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 ... [0s/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [3s/4s] ERROR
Running examples in ‘dynConfiR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: RaceModels
> ### Title: Independent and partially anti-correlated Race Model for
> ### Decision Confidence
> ### Aliases: RaceModels dIRM dPCRM rRM dRM rIRM rPCRM racemodels dIRM2
> ### dIRM3
>
> ### ** Examples
>
> # Plot rt distribution ignoring confidence
> curve(dPCRM(x, 1, mu1=0.5, mu2=-0.5, a=1, b=1, th1=-Inf, th2=Inf, t0=0.1), xlim=c(0,2.5))
> curve(dPCRM(x, 2, mu1=0.5, mu2=-0.5, a=1, b=1, th1=-Inf, th2=Inf, t0=0.1), col="red", add=TRUE)
> curve(dIRM(x, 1, mu1=0.5, mu2=-0.5, a=1, b=1, th1=-Inf, th2=Inf, t0=0.1), lty=2,add=TRUE)
> curve(dIRM(x, 2, mu1=0.5, mu2=-0.5, a=1, b=1, th1=-Inf, th2=Inf, t0=0.1),
+ col="red", lty=2, add=TRUE)
> # t0 indicates minimal response time possible
> abline(v=0.1)
> ## Following example may be equivalently used for the IRM model functions.
> # Generate a random sample
> df1 <- rPCRM(5000, mu1=0.2, mu2=-0.2, a=1, b=1, t0=0.1,
+ wx = 1) # Balance of Evidence
> # Same RT and response distribution but different confidence distribution
> df2 <- rPCRM(5000, mu1=0.2, mu2=-0.2, a=1, b=1, t0=0.1,
+ wint = 0.2, wrt=0.8)
> head(df1)
rt response xl conf
1 0.65 1 -0.1666653 1.1666653
2 11.59 1 -6.8019691 7.8019691
3 1.89 2 -0.3117717 1.3117717
4 0.85 2 0.5670769 0.4329231
5 0.77 2 0.2080419 0.7919581
6 0.32 1 -0.1913931 1.1913931
>
> # Compute density with rt and response as separate arguments
> dPCRM(seq(0, 2, by =0.4), response= 2, mu1=0.2, mu2=-0.2, a=1, b=1, th1=0.5,
+ th2=2, wx = 0.3, wint=0.4, wrt=0.1, t0=0.1)
[1] 0.00000000 0.26919023 0.20371811 0.10962250 0.06320931 0.03928042
> # Compute density with rt and response in data.frame argument
> df1 <- subset(df1, response !=0) # drop trials where no accumulation hit its boundary
> dPCRM(df1[1:5,], mu1=0.2, mu2=-0.2, a=1, b=1, th1=0, th2=Inf, t0=0.1)
[1] 0.449022313 0.001737302 0.051678757 0.215121579 0.244686625
> # s1 and s2 scale other decision relevant parameters
> s <- 2 # common (equal) standard deviation
> dPCRM(df1[1:5,], mu1=0.2*s, mu2=-0.2*s, a=1*s, b=1*s, th1=0, th2=Inf, t0=0.1, s1=s, s2=s)
[1] 0.449022313 0.001737302 0.051678757 0.215121579 0.244686625
> s1 <- 2 # different standard deviations
> s2 <- 1.5
> dPCRM(df1[1:5,], mu1=0.2*s1, mu2=-0.2*s2, a=1*s1, b=1*s2, th1=0, th2=Inf, t0=0.1, s1=s1, s2=s2)
[1] 0.449022313 0.001737302 0.051678757 0.215121579 0.244686625
>
>
> # s1 and s2 scale also confidence parameters
> df1[1:5,]$response <- 2 # set response to 2
> # for confidence it is important to scale confidence parameters with
> # the right variation parameter (the one of the loosing accumulator)
> dPCRM(df1[1:5,], mu1=0.2, mu2=-0.2, a=1, b=1,
+ th1=0.5, th2=2, wx = 0.3, wint=0.4, wrt=0.1, t0=0.1)
[1] 0.253627090 0.000290214 0.044476406 0.188375881 0.213369269
> dPCRM(df1[1:5,], mu1=0.2*s1, mu2=-0.2*s2, a=1*s1, b=1*s2,
+ th1=0.5, th2=2, wx = 0.3/s1, wint = 0.4/s1, wrt = 0.1, t0=0.1, s1=s1, s2=s2)
[1] 0.253627090 0.000290214 0.044476406 0.188375881 0.213369269
> dPCRM(df1[1:5,], mu1=0.2*s1, mu2=-0.2*s2, a=1*s1, b=1*s2,
+ th1=0.5*s1, th2=2*s1, wx = 0.3, wint = 0.4, wrt = 0.1*s1, t0=0.1, s1=s1, s2=s2)
[1] 0.253627090 0.000290214 0.044476406 0.188375881 0.213369269
>
> two_samples <- rbind(cbind(df1, ws="BoE"),
+ cbind(df2, ws="RT"))
> # drop not finished decision processes
> two_samples <- two_samples[two_samples$response!=0,]
> # no difference in RT distributions
> boxplot(rt~ws+response, data=two_samples)
> # but different confidence distributions
> boxplot(conf~ws+response, data=two_samples)
> if (requireNamespace("ggplot2", quietly = TRUE)) {
+ require(ggplot2)
+ ggplot(two_samples, aes(x=rt, y=conf))+
+ stat_density_2d(aes(fill = after_stat(density)),
+ geom = "raster", contour = FALSE, h=c(0.3, 0.7)) +
+ xlim(c(0.2, 1.3))+ ylim(c(0, 2.5))+
+ facet_grid(cols=vars(ws), rows=vars(response), labeller = "label_both")
+ }
Loading required package: ggplot2
Error in `stat_density_2d()`:
! Problem while computing stat.
ℹ Error occurred in the 1st layer.
Caused by error in `compute_layer()`:
! The package "MASS" is required for calculating 2D density.
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. ├─ggplot2 (local) `print.ggplot2::ggplot`(x)
3. │ ├─ggplot2::ggplot_build(x)
4. │ └─ggplot2 (local) `ggplot_build.ggplot2::ggplot`(x)
5. │ └─ggplot2:::by_layer(...)
6. │ ├─rlang::try_fetch(...)
7. │ │ ├─base::tryCatch(...)
8. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
9. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
11. │ │ └─base::withCallingHandlers(...)
12. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
13. │ └─l$compute_statistic(d, layout)
14. │ └─ggplot2 (local) compute_statistic(..., self = self)
15. │ └─self$stat$compute_layer(data, self$computed_stat_params, layout)
16. │ └─ggplot2 (local) compute_layer(..., self = self)
17. │ └─rlang::check_installed("MASS", reason = "for calculating 2D density.")
18. │ └─base::stop(cnd)
19. └─rlang (local) `<fn>`(`<rlb_r___>`)
20. └─handlers[[1L]](cnd)
21. └─cli::cli_abort(...)
22. └─rlang::abort(...)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [3s/4s] OK
Running ‘testthat.R’ [3s/4s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [7s/10s] OK
- checking PDF version of manual ... [6s/9s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR