Skip to content

Commit 38ed9ce

Browse files
Unified message format in geom_smooth() (#4634)
1 parent 13b838f commit 38ed9ce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/stat-smooth.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ StatSmooth <- ggproto("StatSmooth", Stat,
108108
} else {
109109
params$formula <- y ~ x
110110
}
111-
msg <- c(msg, paste0("formula '", deparse(params$formula), "'"))
111+
msg <- c(msg, paste0("formula = '", deparse(params$formula), "'"))
112112
}
113113
if (identical(params$method, "gam")) {
114114
params$method <- mgcv::gam

tests/testthat/test-geom-smooth.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test_that("default smoothing methods for small and large data sets work", {
4242

4343
expect_message(
4444
plot_data <- layer_data(p),
45-
"method = 'loess' and formula 'y ~ x'"
45+
"method = 'loess' and formula = 'y ~ x'"
4646
)
4747
expect_equal(plot_data$y, as.numeric(out))
4848

@@ -61,7 +61,7 @@ test_that("default smoothing methods for small and large data sets work", {
6161

6262
expect_message(
6363
plot_data <- layer_data(p),
64-
"method = 'gam' and formula 'y ~ s\\(x, bs = \"cs\"\\)"
64+
"method = 'gam' and formula = 'y ~ s\\(x, bs = \"cs\"\\)"
6565
)
6666
expect_equal(plot_data$y, as.numeric(out))
6767

@@ -70,7 +70,7 @@ test_that("default smoothing methods for small and large data sets work", {
7070

7171
expect_message(
7272
plot_data <- layer_data(p),
73-
"method = 'gam' and formula 'y ~ s\\(x, bs = \"cs\"\\)"
73+
"method = 'gam' and formula = 'y ~ s\\(x, bs = \"cs\"\\)"
7474
)
7575
expect_equal(plot_data$y, as.numeric(out))
7676
})

0 commit comments

Comments
 (0)