njtierney / mmcc

Fast, tidy functions for mcmc diagnostics and summaries, built with data.table
http://mmcc.njtierney.com/
Other
24 stars 5 forks source link

Get S3 methods working and other fixes #14

Closed njtierney closed 7 years ago

njtierney commented 7 years ago

I added broom into depends, and I think that this is the right way to use the S3 methods from one package, but I might be wrong.

In any case, I couldn't quite get the package to pass devtools::check unless I put broom into Depends. The only difference between Imports and Depends it that Depends attaches the package, so in this case we are attaching broom because we want to use its tidy method. Happy to be shown another way to do this.

I also had a bit of a tinker around with argument names and syntax in the functions, I strongly prefer to use snake_case.

In the vignette we should create the model_text as a string then call it with textConnection in the vignette, to avoid having .txt files hanging around in the vignettes/ repo.

I also removed importFrom stats sd etc because where possible you should call these directly from stats::

Let me know what you think! 😄

samclifford commented 7 years ago

Happy with these changes, as much as using snake case for JAGS variables is strange. I think having a dependency on broom is the simplest way forward at this point rather than trying to import from it. Good call on replacing the .txt file with a connection, I wasn't sure how to do that.