* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/drf.Rcheck’ * using R Under development (unstable) (2026-01-21 r89311) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘drf/DESCRIPTION’ ... OK * this is package ‘drf’ version ‘1.3.0’ * 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 ‘drf’ can be installed ... [92s/86s] OK * used C++ compiler: ‘g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’ * checking package 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 ... 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: ‘transport’ 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 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 line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... INFO GNU make is a SystemRequirements. * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking examples ... OK * checking examples with --run-donttest ... [1391s/75s] ERROR Running examples in ‘drf-Ex.R’ failed The error most likely occurred in: > ### Name: predict.drf > ### Title: Predict from Distributional Random Forests object > ### Aliases: predict.drf > > ### ** Examples > > ## No test: > library(drf) > > n = 10000 > p = 20 > d = 3 > > # Generate training data > X = matrix(rnorm(n * p), nrow=n) > Y = matrix(rnorm(n * d), nrow=n) > Y[, 1] = Y[, 1] + X[, 1] > Y[, 2] = Y[, 2] * X[, 2] > Y[, 3] = Y[, 3] * X[, 1] + X[, 2] > > # Fit DRF object > drf.forest = drf(X, Y) > > # Generate test data > X_test = matrix(rnorm(10 * p), nrow=10) > > out = predict(drf.forest, newdata=X_test) > # Compute E[Y_1 | X] for all data in X_test directly from > # the weights representing the estimated distribution > out$weights %*% out$y[,1] 10 x 1 Matrix of class "dgeMatrix" [,1] [1,] -0.6554339 [2,] 1.8379909 [3,] 0.9752398 [4,] -0.4288511 [5,] -1.3669741 [6,] -0.4411982 [7,] 1.9831038 [8,] -2.2415606 [9,] -0.3969461 [10,] -0.9587051 > > out = predict(drf.forest, newdata=X_test, + functional='mean') > # Compute E[Y_1 | X] for all data in X_test using built-in functionality > out[,1] [1] -0.6554339 1.8379909 0.9752398 -0.4288511 -1.3669741 -0.4411982 [7] 1.9831038 -2.2415606 -0.3969461 -0.9587051 > > out = predict(drf.forest, newdata=X_test, + functional='quantile', + quantiles=c(0.25, 0.75), + transformation=function(y){y[1] * y[2] * y[3]}) > # Compute 25% and 75% quantiles of Y_1*Y_2*Y_3, conditionally on X = X_test[1, ] > out[1,,] q=0.25 q=0.75 -0.05682723 0.03245607 > > out = predict(drf.forest, newdata=X_test, + functional='cov', + transformation=function(y){matrix(1:6, nrow=2) %*% y}) > # Compute 2x2 covariance matrix for (1*Y_1 + 3*Y_2 + 5*Y_3, 2*Y_1 + 4*Y_2 + 6*Y_3), > # conditionally on X = X_test[1, ] > out[1,,] [,1] [,2] [1,] 15.92376 20.17026 [2,] 20.17026 26.15411 > > out = predict(drf.forest, newdata=X_test, + functional='custom', + custom.functional=function(y, w){c(sum(y[, 1] * w), sum(y[, 2] * w))}) > # Compute E[Y_1, Y_2 | X] for all data in X_test by providing custom functional that > # computes it from the weights > out [,1] [,2] [1,] -0.6554339 -0.0015886522 [2,] 1.8379909 0.0826880583 [3,] 0.9752398 0.0612003290 [4,] -0.4288511 0.0019190143 [5,] -1.3669741 -0.0091570496 [6,] -0.4411982 -0.0002587918 [7,] 1.9831038 0.0168415207 [8,] -2.2415606 0.0221735321 [9,] -0.3969461 0.0158251047 [10,] -0.9587051 -0.0141777669 > > ## UNCERTAINTY WEIGHTS ###################################################### > > # Simulate Data that experiences both a mean as well as sd shift > set.seed(10) > n<-1000 > > # Simulate from X > x1 <- runif(n,-1,1) > x2 <- runif(n,-1,1) > x3 <- x1+ runif(n,-1,1) > X0 <- matrix(runif(7*n,-1,1), nrow=n, ncol=7) > X <- cbind(x1,x2, x3, X0) > colnames(X)<-NULL > > # Simulate dependent variable Y > Y <- as.matrix(rnorm(n,mean = 0.8*(x1 > 0), sd = 1 + 1*(x2 > 0))) > > # Fit DRF with 50 CI groups, each 20 trees large. This results in 50 uncertainty weights > DRF <- drf(X=X, Y=Y,num.trees=1000, min.node.size = 5, ci.group.size=1000/50) > > # Obtain Test point > x<-matrix(c(0.2, 0.4, runif(8,-1,1)), nrow=1, ncol=10) > DRFpred<-predict(DRF, newdata=x, estimate.uncertainty=TRUE) > > ## Sample from P_{Y| X=x} > Yxs<-Y[sample(1:n, size=n, replace = T, DRFpred$weights[1,])] Error in sample.int(length(x), size, replace, prob) : T used instead of TRUE Calls: sample -> sample.int Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/blackswan/ripley/R/packages/tests-devel/drf.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:49.40, 1515.49 + 35.04