$draws() method in CmdStanR is still slow

You’ve already mentioned circumventing the built-in methods with fread and I assume you’d prefer a solution that returns you to the cmdstanr functions…but since you linked one of my original posts, I’ll point you to some code I wrote to take the output files and mold them into the same data structure that’s returned by the extract function from rstan, which I’m most familiar/comfortable with.

If you do use it, I’d replace bind_rows with data.table::rbindlist, and double check that the skip logic still applies to your files.

3 Likes