That’s what I keep trying to tell people to do but the BUGS-driven default is to run 1000 iterations first and complain about how Stan is slow. … it (sort of) made sense with BUGS because monitoring was so much harder but sure doesn’t now.
You might save some coding by taking a look at and building on the existing work along these lines by @Charles_Driver here, and what I’ve done in ezStan. I meant to combine our approaches, adding diagnostics to the real-time-updating watchBigStan() function, but got busy with a new job and haven’t had time.
yeah, the latest version of the r package ctsem (not yet on CRAN but github) includes the function stanWplot, which is just a wrapper for rstan that gives online traceplots. I had some cross platform difficulties at first but these are fixed now, as far as I could test. I look forward to @mike-lawrence or somebody creating the more efficient / improved version!