From 49aa6c43813b703cb1a2fe3767661cd01c1b05c3 Mon Sep 17 00:00:00 2001 From: Thomas Lin Pedersen Date: Fri, 18 May 2018 10:09:05 +0200 Subject: [PATCH] Correct result length in vapply + only throw warning when scales not free --- R/facet-wrap.r | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/facet-wrap.r b/R/facet-wrap.r index 189f4c9d87..281ae1f2f7 100644 --- a/R/facet-wrap.r +++ b/R/facet-wrap.r @@ -297,14 +297,16 @@ FacetWrap <- ggproto("FacetWrap", Facet, col_axes <- axes$y$right[layout$SCALE_Y[col_panels]] if (params$strip.position == "bottom" && theme$strip.placement != "inside" && - any(!vapply(row_axes, is.zero, logical(length(row_axes))))) { + any(!vapply(row_axes, is.zero, logical(1))) && + !params$free$x) { warning("Suppressing axis rendering when strip.position = 'bottom' and strip.placement == 'outside'", call. = FALSE) } else { axis_mat_x_bottom[row_pos] <- row_axes } if (params$strip.position == "right" && theme$strip.placement != "inside" && - any(!vapply(col_axes, is.zero, logical(length(col_axes))))) { + any(!vapply(col_axes, is.zero, logical(1))) && + !params$free$y) { warning("Suppressing axis rendering when strip.position = 'right' and strip.placement == 'outside'", call. = FALSE) } else { axis_mat_y_right[col_pos] <- col_axes