Skip to content

Commit 6849bc9

Browse files
committed
restore previous error
1 parent 12d10e2 commit 6849bc9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

R/stat-qq-line.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ StatQqLine <- ggproto("StatQqLine", Stat,
7171

7272
theoretical <- inject(distribution(p = quantiles, !!!dparams))
7373

74-
check_length(line.p, 2L)
74+
if (length(line.p) != 2) {
75+
cli::cli_abort("Cannot fit line quantiles {line.p}. {.arg line.p} must have length 2.")
76+
}
7577

7678
x_coords <- inject(distribution(p = line.p, !!!dparams))
7779
y_coords <- stats::quantile(sample, line.p)

tests/testthat/_snaps/stat-qq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
Computation failed in `stat_qq_line()`.
1616
Caused by error in `compute_group()`:
17-
! `line.p` must be a vector of length 2, not length 1.
17+
! Cannot fit line quantiles 0.15. `line.p` must have length 2.
1818

0 commit comments

Comments
 (0)