Skip to content

Commit

Permalink
Check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Sep 16, 2024
1 parent 2300260 commit 6288bca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/generate.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Does your model require extra variables to produce simulations?", e$message))
.sim
}

block_bootstrap <- function (n, window_size, size = length(x)) {
block_bootstrap <- function (n, window_size, size = n) {
n_blocks <- size%/%window_size + 2
bx <- numeric(n_blocks * window_size)
for (i in seq_len(n_blocks)) {
Expand Down
7 changes: 6 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,12 @@ build_fbl_layer <- function(object, data = NULL, level = c(80, 95),
if (!na.rm && anyNA(x)) {
return(matrix(c(NA_real_, NA_real_), ncol = 2))
}
do.call(rbind, lapply(quantile(x, (1 + c(-1, 1) * .width)/2, type = "marginal", na.rm = na.rm), t))

if (packageVersion("distributional") > "0.4.0") {
do.call(rbind, lapply(quantile(x, (1 + c(-1, 1) * .width)/2, type = "marginal", na.rm = na.rm), t))
} else {
do.call(rbind, lapply(quantile(x, (1 + c(-1, 1) * .width)/2, na.rm = na.rm), t))
}
}

dist_qi_frame <- function(data, level) {
Expand Down

0 comments on commit 6288bca

Please sign in to comment.