Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow alternative methods other than stats::density()? #91

Open
Aariq opened this issue Feb 9, 2024 · 0 comments
Open

Allow alternative methods other than stats::density()? #91

Aariq opened this issue Feb 9, 2024 · 0 comments

Comments

@Aariq
Copy link

Aariq commented Feb 9, 2024

ggridges/R/stats.R

Lines 177 to 182 in a8a9982

d <- stats::density(
data$x,
weights = weights,
bw = bandwidth[panel_id], from = from[panel_id], to = to[panel_id], na.rm = TRUE,
n = n
)

stats::density() runs out of memory with very large datasets, but functions in the KernSmooth package seem like a good alternative—they are fast, accurate, and work with very large datasets. See more here: https://vita.had.co.nz/papers/density-estimation.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant