Compare and get the count between a vector and a number

Hi, is there a quick way to compare a vector and a number?

In R, I can just do

sum (x > 3);


The > operator in Stan does not accept vectors, so the best way to do this will be a loop.

1 Like