I’ve recently started learning cmdstanpy(or stan in general), and was wondering if there is a way to create a JSON data file other than manually converting data using json.dump in python.
So for example, say I have six columns, each with different length, I’ve manually converted each column into a JSON file using json.dump in python, then in RStudio, combine all those data by copy and pasting.
Welcome to Discourse!
cmdstanpy.utils help you? Or since your goal is to get these into R, perhaps
rdump (also in
cmdstanpy.utils) might help.
thank u!!! worked in my case also
this has been renamed to
write_stan_json (as in CmdStanR) and is now properly documented and will be in the next CmdStanPy release. Expose write_stan_json utility by WardBrian · Pull Request #418 · stan-dev/cmdstanpy · GitHub