Skip to content

Commit 7c1743e

Browse files
Yunuuuuteunbrand
authored andcommitted
fix other partial matching
1 parent f0802db commit 7c1743e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

R/facet-.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ map_facet_data <- function(data, layout, params) {
892892
return(vec_cbind(data %|W|% NULL, PANEL = integer(0)))
893893
}
894894

895-
vars <- params$facet %||% c(params$rows, params$cols)
895+
vars <- params$facets %||% c(params$rows, params$cols)
896896

897897
if (length(vars) == 0) {
898898
data$PANEL <- layout$PANEL
@@ -911,7 +911,7 @@ map_facet_data <- function(data, layout, params) {
911911
# Compute faceting values
912912
facet_vals <- eval_facets(vars, data, params$.possible_columns)
913913

914-
include_margins <- !isFALSE(params$margin %||% FALSE) &&
914+
include_margins <- !isFALSE(params$margins %||% FALSE) &&
915915
nrow(facet_vals) == nrow(data) && grid_layout
916916
if (include_margins) {
917917
# Margins are computed on evaluated faceting values (#1864).

R/labels.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ get_alt_text.gtable <- function(p, ...) {
351351
#'
352352
generate_alt_text <- function(p) {
353353
# Combine titles
354-
if (!is.null(p$label$title %||% p$labels$subtitle)) {
354+
if (!is.null(p$labels$title %||% p$labels$subtitle)) {
355355
title <- sub("\\.?$", "", c(p$labels$title, p$labels$subtitle))
356356
if (length(title) == 2) {
357357
title <- paste0(title[1], ": ", title[2])

tests/testthat/test-legend-draw.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test_that("all keys can be drawn without 'params'", {
3636
expect_in(nse, names(keys))
3737

3838
# Add title to every key
39-
template <- gtable(width = unit(size, "mm"), heights = unit(c(1, size), c("lines", "mm")))
39+
template <- gtable(widths = unit(size, "mm"), heights = unit(c(1, size), c("lines", "mm")))
4040
keys <- Map(
4141
function(key, name) {
4242
text <- textGrob(name, gp = gpar(fontsize = 8))

0 commit comments

Comments
 (0)