Skip to content

Commit

Permalink
Merge pull request #369 from larmarange/small_ggtable_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke authored Jun 5, 2020
2 parents 2837ab6 + 88cf6b5 commit 6279186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions R/ggtable.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' ggtable(tips, "smoker", c("day", "time", "sex"), cells = "row.prop")
#'
#' # filling cells with standardized residuals
#' ggtable(tips, "smoker", c("day", "time", "sex"), fill = "stdres")
#' ggtable(tips, "smoker", c("day", "time", "sex"), fill = "stdres", legend = 1)
#'
#' # if continuous variables are provided, just displaying some summary statistics
#' ggtable(tips, c("smoker", "total_bill"), c("day", "time", "sex", "tip"))
Expand Down Expand Up @@ -67,8 +67,6 @@ ggtable <- function(
ggduo_args$xProportions <- "auto"
if (!"yProportions" %in% names(ggduo_args))
ggduo_args$yProportions <- "auto"
if (!"legend" %in% names(ggduo_args) & fill == "stdres")
ggduo_args$legend <- 1

p <- do.call(ggduo, ggduo_args)
p
Expand Down
2 changes: 1 addition & 1 deletion R/stat_cross.R
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ ggally_crosstable <- function(
theme(axis.ticks = element_blank())

if (fill == "stdres")
p <- p + scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE)
p <- p + scale_fill_steps2(breaks = c(-Inf, -3, -2, 2, 3, Inf))

p
}

0 comments on commit 6279186

Please sign in to comment.