Error using pp_check with categorical model in brms

Operating System Ubuntu 16.04, Version 2.3.0 cran (I also tried the latest from github), R 3.4.2:

Hi, thank you for this great package.

I’m still learning the bayesian ropes, especially with brms, so I’m probably just misunderstanding something basic.

I’d like to make a diagnostic plot (pp_check) as a figure in a paper, but it gives the following error:

mod <- brm(
Species ~ Sepal.Length,
data = iris,
family = categorical,
chains = 2, iter = 300


Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, :
‘max’ not meaningful for factors

Are these posterior barplots possible with categorical models? Somehow I thought it would be hooking into .

Am I supposed to be giving pp_check extra switches when the distribution is categorical?

Thanks again!

There is a problem somewhere in the code where factors are not converted to integers correctly. Let me check that.

This should now be fixed in the latest dev version of brms from github to be installed via

if (!require("devtools")) {

This works great, thank you so much!