Skip to content

Commit a58b48c

Browse files
Improve the error message of fortify.default() (#4963)
1 parent a383fdb commit a58b48c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/fortify.r

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fortify.grouped_df <- function(model, data, ...) {
3535
}
3636
#' @export
3737
fortify.default <- function(model, data, ...) {
38-
msg <- "{.arg data} must be a {.cls data.frame}, or an object coercible by `fortify()`, not {obj_desc(model)}."
38+
msg <- glue("{{.arg data}} must be a {{.cls data.frame}}, or an object coercible by `fortify()`, not {obj_desc(model)}.")
3939
if (inherits(model, "uneval")) {
4040
msg <- c(
4141
msg,

tests/testthat/_snaps/fortify.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fortify.default proves a helpful error with class uneval
22

3-
`data` must be a <data.frame>, or an object coercible by `fortify()`, not an S3 object with class {.cls uneval}.
3+
`data` must be a <data.frame>, or an object coercible by `fortify()`, not an S3 object with class <uneval>.
44
i Did you accidentally pass `aes()` to the `data` argument?
55

0 commit comments

Comments
 (0)