- using R version 4.6.2 (2026-10-29)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-16 (Debian 16.2.0-4) 16.2.0
GNU Fortran (Debian 16.2.0-4) 16.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
* current time: 2026-11-21 11:02:49 UTC
- checking for file ‘ao/DESCRIPTION’ ... OK
- this is package ‘ao’ version ‘1.2.3’
- package encoding: UTF-8
- 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 ‘ao’ can be installed ... OK
See the install log for details.
- 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 ... [5s/6s] OK
- checking whether the package can be loaded with stated dependencies ... [4s/5s] OK
- checking whether the package can be unloaded cleanly ... [4s/5s] OK
- checking whether the namespace can be loaded with stated dependencies ... [4s/5s] OK
- checking whether the namespace can be unloaded cleanly ... [5s/6s] OK
- checking loading without being on the library search path ... [5s/6s] OK
- checking whether startup messages can be suppressed ... [5s/6s] 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 ... [23s/31s] OK
- checking Rd files ... [0s/0s] 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 installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [6s/8s] ERROR
Running examples in ‘ao-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ao-package
> ### Title: ao: Alternating Optimization
> ### Aliases: ao-package
> ### Keywords: internal
>
> ### ** Examples
>
> # Example 1: Minimization of Himmelblau's function --------------------------
>
> himmelblau <- function(x) (x[1]^2 + x[2] - 11)^2 + (x[1] + x[2]^2 - 7)^2
> ao(f = himmelblau, initial = c(0, 0))
$estimate
[1] 3.584428 -1.848126
$value
[1] 9.606386e-12
$details
iteration value p1 p2 b1 b2 seconds
1 0 1.700000e+02 0.000000 0.000000 0 0 0.000000000
2 1 1.327270e+01 3.395691 0.000000 1 0 0.141055822
3 1 1.743664e+00 3.395691 -1.803183 0 1 0.029119730
4 2 2.847290e-02 3.581412 -1.803183 1 0 0.022240877
5 2 4.687468e-04 3.581412 -1.847412 0 1 0.019167185
6 3 7.368057e-06 3.584381 -1.847412 1 0 0.015756607
7 3 1.164202e-07 3.584381 -1.848115 0 1 0.144683123
8 4 1.893311e-09 3.584427 -1.848115 1 0 0.011487246
9 4 9.153860e-11 3.584427 -1.848124 0 1 0.009066343
10 5 6.347425e-11 3.584428 -1.848124 1 0 0.008466005
11 5 9.606386e-12 3.584428 -1.848126 0 1 0.008826256
$seconds
[1] 0.4098692
$stopping_reason
[1] "change in function value between 1 iteration is < 1e-06"
>
> # Example 2: Maximization of 2-class Gaussian mixture log-likelihood --------
>
> normal_mixture_loglik_uc = function(mu, logsd, eta, data) {
+ sd <- exp(logsd)
+ e <- exp(eta[1])
+ den <- 1 + e
+ q1 <- e / den
+ q2 <- 1 / den
+ l1 <- log(q1) + dnorm(data, mu[1], sd[1], log = TRUE)
+ l2 <- log(q2) + dnorm(data, mu[2], sd[2], log = TRUE)
+ m <- pmax(l1, l2)
+ sum(m + log(exp(l1 - m) + exp(l2 - m)))
+ }
>
> set.seed(123)
>
> data <- datasets::faithful$eruptions
>
> fit <- ao(
+ f = normal_mixture_loglik_uc,
+ initial = c(mean(data) + c(-1, 1), rep(log(sd(data)), 2), 0),
+ target = c("mu", "logsd", "eta"),
+ npar = c(2, 2, 1),
+ data = data,
+ partition = "random",
+ base_optimizer = optimizeR::Optimizer$new("ucminf::ucminf"),
+ minimize = FALSE,
+ add_details = FALSE
+ )
Error:
! The optimizer "ucminf::ucminf" needs the package ucminf.
ℹ Please install it first.
Backtrace:
▆
1. ├─ao::ao(...)
2. └─optimizeR::Optimizer$new("ucminf::ucminf")
3. └─optimizeR (local) initialize(...)
4. └─cli::cli_abort(...)
5. └─rlang::abort(...)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [15s/19s] OK
Running ‘testthat.R’ [14s/18s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [16s/21s] OK
- checking PDF version of manual ... [5s/7s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR