Fix tidy.brmsfit() output for model without a ran_pars
component
#148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #147.
Changes to
R/brms_tidiers.R
:tidy.brmsfit()
function, reformat the"group"
and"term"
columns of theout
object in the case whennrow(res_list$fixed) > 0
butnrow(res_list$ran_pars) == 0
(in this case, those columns were lists withNULL
values instead of vectors ofNA
).Changes to
inst/extdata/run_examples.R
:brms_brm_fit4
for the brms package, taken from?brms::brm
. This example is used to test that the fix totidy.brmsfit()
works fine.inst/extdata/brms_example.rda
with the other brms examples already present.Changes to
tests/testthat/test-brms.R
:tidy.brmsfit()
output are correct, using some brms examples already shipped withbroom.mixed
and the newly added brms examplebrms_brm_fit4
.