Skip to content

Commit c4c826a

Browse files
Making bw argument in stat_density case insensitive. Fixes #5941 (#6041)
1 parent c706a01 commit c4c826a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/stat-density.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ reflect_density <- function(dens, bounds, from, to) {
242242
precompute_bw = function(x, bw = "nrd0") {
243243
bw <- bw[1]
244244
if (is.character(bw)) {
245+
bw <- to_lower_ascii(bw)
245246
bw <- arg_match0(bw, c("nrd0", "nrd", "ucv", "bcv", "sj", "sj-ste", "sj-dpi"))
246247
bw <- switch(
247248
to_lower_ascii(bw),

0 commit comments

Comments
 (0)