Skip to content

posterior 1.4.0

Compare
Choose a tag to compare
@paul-buerkner paul-buerkner released this 21 Feb 13:51
· 274 commits to master since this release

Enhancements

  • Added new rvar_factor() and rvar_ordered() subtypes of rvar() that work
    analogously to factor() and ordered() (#149). See the new section on
    rvar_factors in vignette("rvar").
  • The draws_df(), draws_list(), and draws_rvars() formats now support
    discrete variables stored as factors / ordereds (or rvar_factors /
    rvar_ordereds). If converted to formats that do not support discrete
    variables with named levels (draws_matrix() and draws_array()),
    factor-like variables are converted to numerics.
  • Made match() and %in% generic and added support for rvars to both
    functions.
  • Added modal_category(), entropy(), and dissent() functions for
    summarizing discrete draws.
  • Allow lists of draws objects to be passed as the first argument to
    bind_draws() (#253).
  • Improving formatting of summarise_draws output via tibble::num.
  • print.rvar() and format.rvar() now default to a smaller number of
    significant digits in more cases, including when printing in data frames.
    This is controlled by the new "posterior.digits" option (see
    help("posterior-package")).
  • Implemented faster vec_proxy.rvar() and vec_restore.rvar(), improving
    performance of rvars in tibbles (and elsewhere vctrs is used).

Bug Fixes

  • Ensure that as_draws_rvars() preserves dimensions of length-1 arrays (#265).
  • Fix some minor compatibility issues with rvar, vctrs, dplyr, and
    ggplot2 (#267, #269).