You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error when I try to compute percentile intervals. I think it is related to the warning issued when the number of bootstrap replicates is smaller than 1000.
In some applications, I don’t get any problems, but I was able to save a data frame with splits and results that generates the error.
library(rsample)
b<- readRDS(url("https://arelbundock.com/rsample_reprex.rds"))
int_pctl(b, statistics=results)
#> Error in "lapply(text, glue_cmd, .envir = .envir)": ! Could not evaluate cli `{}`#> expression: `cli::qty(terms)`.#> Caused by error in `make_quantity(expr)`:#> ! length(object) == 1 is not TRUE
The problem does not affect 1.2.1. It was introduced in 1.3.0.
The issue is that in my example data, the term column is numeric. But here, cli::qty() assumes that terms<-x$term is character, and raises the un-informative error above when terms is numeric.
if (nrow(x) >0) {
terms<-x$term
cli_warn(
"Recommend at least {B} non-missing bootstrap resamples for {cli::qty(terms)} term{?s} {.code {terms}}.",
call=call
)
}
Activity
[-]`intl_pct`: `glue` error on R<1000 warning[/-][+]`intl_pct`: error on R<1000 warning[/+]vincentarelbundock commentedon Jun 23, 2025
The problem does not affect 1.2.1. It was introduced in 1.3.0.
The issue is that in my example data, the
termcolumn is numeric. But here,cli::qty()assumes thatterms<-x$termis character, and raises the un-informative error above whentermsis numeric.A simple solution would be to:
fix #574
hfrick commentedon Jan 29, 2026
@vincentarelbundock Thank you for the bug report and suggested fix! 🙌