* using log directory 'd:/Rcompile/CRANpkg/local/4.5/horseshoe.Rcheck' * using R version 4.5.1 (2025-06-13 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.2.0 GNU Fortran (GCC) 14.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'horseshoe/DESCRIPTION' ... OK * this is package 'horseshoe' version '0.2.0' * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'horseshoe' 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s] OK * checking whether the package can be loaded with stated dependencies ... [0s] OK * checking whether the package can be unloaded cleanly ... [0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s] OK * checking whether the namespace can be unloaded cleanly ... [0s] OK * checking loading without being on the library search path ... [0s] 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 ... [3s] OK * checking Rd files ... [0s] 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 installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [3s] ERROR Running examples in 'horseshoe-Ex.R' failed The error most likely occurred in: > ### Name: HS.normal.means > ### Title: The horseshoe prior for the sparse normal means problem > ### Aliases: HS.normal.means > > ### ** Examples > > #Empirical Bayes example with 20 signals, rest is noise > #Posterior mean for the signals is plotted > #And variable selection is performed using the credible intervals > #And the credible intervals are plotted > truth <- c(rep(0, 80), rep(8, 20)) > data <- truth + rnorm(100, 1) > tau.hat <- HS.MMLE(data, Sigma2 = 1) > res.HS1 <- HS.normal.means(data, method.tau = "fixed", tau = tau.hat, + method.sigma = "fixed", Sigma2 = 1) [1] 1000 [1] 2000 [1] 3000 [1] 4000 [1] 5000 [1] 6000 > #Plot the posterior mean against the data (signals in blue) > plot(data, res.HS1$BetaHat, col = c(rep("black", 80), rep("blue", 20))) > #Find the selected betas (ideally, the last 20 are equal to 1) > HS.var.select(res.HS1, data, method = "intervals") [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 [75] 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > #Plot the credible intervals > library(Hmisc) Attaching package: 'Hmisc' The following objects are masked from 'package:base': format.pval, units > xYplot(Cbind(res.HS1$BetaHat, res.HS1$LeftCI, res.HS1$RightCI) ~ 1:100) Error in sRequire("lattice") : package lattice is required but not installed Calls: xYplot -> sRequire Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [13s] OK * checking PDF version of manual ... [21s] OK * checking HTML version of manual ... [2s] OK * DONE Status: 1 ERROR