I kinda got used to this approach (works well with a tidyverse-workflow):
rstan::extract(s, permute = FALSE) %>% reshape2::melt()
This gives an iterations
, chains
, parameters
, and value
column, which then works well (kind of elegantly) with anything in dyplr, tidyr, and specifically ggplot2…