In the tidy.brmsfit() function, reformat the "group" and "term" columns of the out object in the case when nrow(res_list$fixed) > 0 but nrow(res_list$ran_pars) == 0 (in this case, those columns were lists with NULL values instead of vectors of NA).
Changes to inst/extdata/run_examples.R:
Add a new example brms_brm_fit4 for the brms package, taken from ?brms::brm. This example is used to test that the fix to tidy.brmsfit() works fine.
This added example is saved to inst/extdata/brms_example.rda with the other brms examples already present.
Changes to tests/testthat/test-brms.R:
Add some basic tests to check that the columns "effect", "component", "group", and "term" of tidy.brmsfit() output are correct, using some brms examples already shipped with broom.mixed and the newly added brms example brms_brm_fit4.
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
.