Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 28, 2023
1 parent edc6769 commit 2a279cd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions R/plot.check_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ data_plot.performance_pp_check <- function(x, type = "density", ...) {
dataplot$grp <- rep(seq_len(ncol(x)), each = nrow(x))

attr(dataplot, "info") <- list(
"xlab" = attr(x, "response_name"),
"ylab" = ifelse(identical(type, "density"), "Density", "Counts"),
"title" = "Posterior Predictive Check",
"check_range" = attr(x, "check_range"),
"bandwidth" = attr(x, "bandwidth"),
"model_info" = attr(x, "model_info")
xlab = attr(x, "response_name"),
ylab = ifelse(identical(type, "density"), "Density", "Counts"),
title = "Posterior Predictive Check",
check_range = attr(x, "check_range"),
bandwidth = attr(x, "bandwidth"),
model_info = attr(x, "model_info")
)

class(dataplot) <- unique(c("data_plot", "see_performance_pp_check", class(dataplot)))
Expand Down Expand Up @@ -419,13 +419,13 @@ plot.see_performance_pp_check <- function(x,

replicated <- rbind(
data.frame(
x = sapply(x[which(names(x) != "y")], min),
x = vapply(x[which(names(x) != "y")], min, numeric(1)),
group = "Minimum",
color = "Model-predicted data",
stringsAsFactors = FALSE
),
data.frame(
x = sapply(x[which(names(x) != "y")], max),
x = vapply(x[which(names(x) != "y")], max, numeric(1)),
group = "Maximum",
color = "Model-predicted data",
stringsAsFactors = FALSE
Expand Down

0 comments on commit 2a279cd

Please sign in to comment.