gg ridge not working on 4.4.2 and showing the following error Error in "ggridges::geom_density_ridges()
: ! Problem while computing aesthetics. Error occurred in the 1st layer. Caused by error: ! object 'value' not found" while its perfectly working with 4.3.y versions is there any way that it could work with current version or should I install the older version of R
Can you check if this example works for you:
library(ggplot2)
library(ggridges)
ggplot(iris, aes(x = Sepal.Length, y = Species)) +
geom_density_ridges(rel_min_height = 0.005) +
scale_y_discrete(expand = c(0.01, 0)) +
scale_x_continuous(expand = c(0.01, 0)) +
theme_ridges()
Created on 2024-12-10 with reprex v2.1.0
This is the example from ?geom_density_ridges
and it works for me on R 4.4.0. Can you share a minimal reproducible example that gives you this error?
that just means you don't have a variable called value
> getRversion()
[1] ‘4.4.2’
>
> library(ggplot2)
> library(ggridges)
>
> ggplot(iris, aes(x = Sepal.Length, y = value)) +
+ geom_density_ridges(rel_min_height = 0.005) +
+ scale_y_discrete(expand = c(0.01, 0)) +
+ scale_x_continuous(expand = c(0.01, 0)) +
+ theme_ridges()
Error in `geom_density_ridges()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error:
! object 'value' not found
Run `rlang::last_trace()` to see where the error occurred.