n-kall / priorsense

priorsense: an R package for prior diagnostics and sensitivity
https://n-kall.github.io/priorsense/
GNU General Public License v3.0
53 stars 5 forks source link

density(x, weights = *) gives warnings with R >= 4.3.0 #29

Closed avehtari closed 3 months ago

avehtari commented 6 months ago

From https://developer.r-project.org/blosxom.cgi/R-devel/2023/03/23

density(x, weights = *) now warns if automatic bandwidth selection happens without using weights; new optional warnWbw may suppress the warning. Prompted by Christoph Dalitz' PR#18490 and its discussants.

This is part of R releases > 4.3.0 (since April 2023).

This causes annoying warnings in priorsense. The new option warnWbw is not very helpful as it causes extra argument warning in older R releases. So the warnings should be suppressed, or R version checked.

n-kall commented 6 months ago

This seems to no longer occur in ggplot 3.5.0

avehtari commented 6 months ago

The relevant PR in ggplot2 https://github.com/tidyverse/ggplot2/pull/5281