Error in geom_boxplot():
! Problem while computing stat.
ℹ Error occurred in the 1st layer.
Caused by error in seq_len():
! argument must be coercible to non-negative integer
Backtrace:
base (local) <fn>(x)
ggplot2:::print.ggplot(x)
ggplot2:::ggplot_build.ggplot(x)
ggplot2:::by_layer(...)
ggplot2 (local) f(l = layers[[i]], d = data[[i]])
...
ggplot2:::split_with_index(seq_len(nrow(df)), ids)
Error in geom_boxplot(show.legend = F) :
ℹ Error occurred in the 1st layer.
Caused by error in seq_len():
! argument must be coercible to non-negative integer
zone_s_df %>% dplyr::select(-stclass) %>% pivot_longer(cols = elev_m:eca90_dsm) %>% ggplot(aes(x=cluster_f, y=value, color=cluster_f))+ geom_boxplot(show.legend = F)+ scale_color_colorblind()+ facet_wrap(~name, scales="free_y", ncol=3)+ stat_compare_means(label = "p.format", hjust = -.1, vjust=1)+ theme(legend.position = "none")
Error in
geom_boxplot()
: ! Problem while computing stat. ℹ Error occurred in the 1st layer. Caused by error inseq_len()
: ! argument must be coercible to non-negative integer Backtrace:<fn>
(x)seq_len()
: ! argument must be coercible to non-negative integer