Skip to content

Commit 24dd121

Browse files
committed
update ppc-discrete examples
1 parent 09619f3 commit 24dd121

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

R/ppc-discrete.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@
7474
#' dim(yrep)
7575
#' group <- gl(2, 50, length = 100, labels = c("GroupA", "GroupB"))
7676
#'
77+
#' color_scheme_set("mix-pink-blue")
7778
#' ppc_bars(y, yrep)
79+
#'
80+
#' # split by group, change interval width, and display proportion
81+
#' # instead of count on y-axis
82+
#' color_scheme_set("mix-blue-pink")
7883
#' ppc_bars_grouped(y, yrep, group, prob = 0.5, freq = FALSE)
7984
#'
8085
NULL
@@ -174,7 +179,10 @@ ppc_bars_grouped <-
174179
#' y <- rpois(100, 20)
175180
#' yrep <- matrix(rpois(10000, 20), ncol = 100)
176181
#'
182+
#' color_scheme_set("brightblue")
177183
#' ppc_rootogram(y, yrep)
184+
#' ppc_rootogram(y, yrep, prob = 0)
185+
#'
178186
#' ppc_rootogram(y, yrep, style = "hanging", prob = 0.8)
179187
#' ppc_rootogram(y, yrep, style = "suspended")
180188
#'
@@ -264,7 +272,7 @@ ppc_rootogram <- function(y,
264272

265273
graph +
266274
theme_default() +
267-
no_legend_spacing()
275+
theme(legend.spacing.y = unit(-0.25, "cm"))
268276
}
269277

270278

man/PPC-discrete.Rd

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)