# tidybayes 3.0.7 (CRAN)

Tidy Data and 'Geoms' for Bayesian Models

[Record of 3.0.7](/cran/tidybayes/v/3.0.7.md) | Compare: [With 3.0.6](/cran/tidybayes/compare/3.0.6...3.0.7.md), [With another package](/compare/tidybayes.md#add), [Downloads](/downloads/compare/tidybayes.md#add) | [Licences](/cran/tidybayes/licences.md) | [SBOM](/cran/tidybayes/sbom.md)

Install from CRAN: `install.packages("tidybayes")`

Also from:

- r2u (Ubuntu binaries): `sudo apt install r-cran-tidybayes` _Listed from recorded download activity on this channel, not from a live index, so read it as last known. Bioconductor packages are named r-bioc-<name> there._
- Fedora COPR (iucar/cran): `sudo dnf install R-CRAN-tidybayes` _A rebuild of what CRAN lists, so it can lag CRAN by a rebuild._
- autoCRAN (openSUSE): `sudo zypper install R-tidybayes` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._
- conda-forge: `conda install -c conda-forge r-tidybayes` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._

- CRAN checks: All OK (13 platforms)
- CRAN 30-day downloads: 5,240 (down 11% on the 30 days before, the worse direction)
- Dependent packages: 11 (12 more suggest it)
- Test coverage: 80% (of lines run by tests)
- Advisories: None known

## About

[Method](/about/licenses.md)

Compose data for and extract, manipulate, and visualize posterior draws from Bayesian models ('JAGS', 'Stan', 'rstanarm', 'brms', 'MCMCglmm', 'coda', ...) in a tidy data format.

**Full description**

Compose data for and extract, manipulate, and visualize posterior draws from Bayesian models ('JAGS', 'Stan', 'rstanarm', 'brms', 'MCMCglmm', 'coda', ...) in a tidy data format. Functions are provided to help extract tidy data frames of draws from Bayesian models and that generate point summaries and intervals in a tidy format. In addition, 'ggplot2' 'geoms' and 'stats' are provided for common visualization primitives like points with multiple uncertainty intervals, eye plots (intervals plus densities), and fit curves with multiple, arbitrary uncertainty bands.

- Maintainer: Matthew Kay
- Licence: [GPL (>= 3)](/licences/GPL-3.md)
- Latest release: 15 Sep 2024
- First release: 2 Aug 2018

- [Website](https://mjskay.github.io/tidybayes/)
- [CRAN page](https://cran.r-project.org/package=tidybayes)
- [Source repository](https://github.com/mjskay/tidybayes)
- [Issues](https://github.com/mjskay/tidybayes/issues)
- [Source of every release](https://github.com/cran/tidybayes)

[Compare with another package](/compare/tidybayes.md#add)

**More details**

- Releases: 16
- Needs compilation: No
- Needs R: >= 4.0.0
- Language: en-US
- RoxygenNote: 7.3.2

**Subjects (1) [Method](/about/subjects.md#found)**

- [Tidy modelling](/topics/subjects/tidy-modelling.md)

**Cite**

#### Package

Run in R for the authors' preferred citation:

`citation("tidybayes")`

The package provides a citation file that builds its entry when R runs it. Run `citation()` to see it.

#### R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA: Balamuta, J. J. (2026). R Observatory: Metrics for tidybayes version 3.0.7 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040

BibTeX:

```
@misc{robservatorytidybayes,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {tidybayes} version 3.0.7},
  year      = {2026},
  publisher = {HJJB, LLC},
  doi       = {10.5281/zenodo.21843040},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/tidybayes},
  note      = {Data set. Data release v2026-10-28}
}
```

From data release v2026-10-28, which the citation names so these numbers can be found later.

## Health

[Method](/about/checks-health.md)

All 13 check platforms pass.

13 CRAN platforms: 13 OK.

Platforms now:

- r-devel-linux-x86_64-debian-clang: OK
- r-devel-linux-x86_64-debian-gcc: OK
- r-devel-linux-x86_64-fedora-clang: OK
- r-devel-linux-x86_64-fedora-gcc: OK
- r-devel-windows-x86_64: OK
- r-oldrel-macos-arm64: OK
- r-oldrel-macos-x86_64: OK
- r-oldrel-windows-x86_64: OK
- r-patched-linux-x86_64: OK
- r-release-linux-x86_64: OK
- r-release-macos-arm64: OK
- r-release-macos-x86_64: OK
- r-release-windows-x86_64: OK

#### Over time

No change since 4 Aug 2026

**As a list (5)**

| Changed | Worst status | OK | Notes | Warnings | Errors |
| --- | --- | ---: | ---: | ---: | ---: |
| 4 Aug 2026 | OK | 13 | 0 | 0 | 0 |
| 1 Aug 2026 | Note | 12 | 1 | 0 | 0 |
| 8 Jun 2026 | OK | 12 | 0 | 0 | 0 |
| 7 Jun 2026 | Note | 12 | 1 | 0 | 0 |
| 10 Mar 2026 | OK | 14 | 0 | 0 | 0 |

Since March 2026

[Check results on CRAN](https://cran.r-project.org/web/checks/check_results_tidybayes.html)

## Downloads

[Method](/about/downloads.md)

- Downloads in the last 30 days: 6,736 (up 3.7% on the 30 days before, the better direction. It is the sum of 4 channels: CRAN, r2u, autoCRAN and conda-forge.)

CRAN alone: rank among CRAN packages, last 30 days: 1,548 of 26,530.

| Channel | Downloads in the last 30 days | In the total | Rank in that channel | Change |
| --- | ---: | --- | --- | --- |
| CRAN | 5,240 | yes | 1,548 of 26,530 | down 11% on the 30 days before, the worse direction |
| r2u | 733 | yes | 966 of 30,526 | up 169% on the 30 days before, the better direction |
| autoCRAN | 119 | yes | 564 of 29,212 | up 2.6% on the 30 days before, the better direction |
| conda-forge | 644 | yes | 1,299 of 3,828 | up 194% on the 30 days before, the better direction |

Other windows: [Last 90 days](/cran/tidybayes.md?win=90d#downloads), [Last 365 days](/cran/tidybayes.md?win=365d#downloads), [All time](/cran/tidybayes.md?win=all#downloads).

To leave channels out of the total, name them in the address, joined by dots: `?off=autocran.conda_forge`.

#### Over time

Downloads over time, the last 12 whole months:

| Month | CRAN | r2u | autoCRAN | conda-forge | Sum |
| --- | ---: | ---: | ---: | ---: | ---: |
| Oct 2025 | 16,285 | 89 | no figure | 311 | 16,685 |
| Nov 2025 | 11,100 | 67 | no figure | 366 | 11,533 |
| Dec 2025 | 11,618 | 49 | no figure | 521 | 12,188 |
| Jan 2026 | 6,957 | 22 | no figure | 303 | 7,282 |
| Feb 2026 | 5,823 | 226 | no figure | 290 | 6,339 |
| Mar 2026 | 5,995 | 38 | no figure | 162 | 6,195 |
| Apr 2026 | 6,005 | 78 | no figure | 123 | 6,206 |
| May 2026 | 6,122 | 81 | no figure | 369 | 6,572 |
| Jun 2026 | 5,765 | 61 | no figure | 138 | 5,964 |
| Jul 2026 | 5,304 | 135 | 114 | 159 | 5,712 |
| Aug 2026 | 4,525 | 274 | 148 | 222 | 5,169 |
| Sep 2026 | 6,156 | 729 | 108 | 644 | 7,637 |

First day on record: CRAN 2 Aug 2018, r2u 8 May 2022, autoCRAN 29 Jun 2026, conda-forge 1 Oct 2018.

Every channel here counts downloads, so the channels can be stacked and summed for one period. Each channel counts in its own way and covers a different span of years, so read a sum as a rough total, and read a rise where a channel begins as that channel starting, not as growth.

Weeks start on Monday. A first or last week or month that the channel does not cover in full is left out, so every point is a whole period.

Days with no record add nothing to their week or month. For a little-used package that is usually a day with no downloads, but it can also be a gap in collection.

[Compare downloads](/downloads/compare/tidybayes.md#add)

## Dependencies

[Method](/about/reverse-dependencies.md)

- Needs: 15
- Dependent packages: 11
- Suggested by: 12

**Needs (15)**

- [arrayhelpers](/cran/arrayhelpers.md)
- [cli](/cran/cli.md)
- [coda](/cran/coda.md)
- [dplyr](/cran/dplyr.md)
- [ggdist](/cran/ggdist.md)
- [ggplot2](/cran/ggplot2.md)
- [magrittr](/cran/magrittr.md)
- methods
- [posterior](/cran/posterior.md)
- [rlang](/cran/rlang.md)
- [tibble](/cran/tibble.md)
- [tidyr](/cran/tidyr.md)
- [tidyselect](/cran/tidyselect.md)
- [vctrs](/cran/vctrs.md)
- [withr](/cran/withr.md)

- Installing it adds: 43 packages, 34.0 MB of source
- Of those, need compilation: 22

**Optional extras (31)**

- [bayesplot](/cran/bayesplot.md)
- [bindrcpp](/cran/bindrcpp.md)
- [brms](/cran/brms.md)
- [broom](/cran/broom.md)
- [covr](/cran/covr.md)
- [cowplot](/cran/cowplot.md)
- [distributional](/cran/distributional.md)
- [emmeans](/cran/emmeans.md)
- [forcats](/cran/forcats.md)
- [gganimate](/cran/gganimate.md)
- [ggrepel](/cran/ggrepel.md)
- [gifski](/cran/gifski.md)
- [jagsUI](/cran/jagsUI.md)
- [knitr](/cran/knitr.md)
- [MCMCglmm](/cran/MCMCglmm.md)
- [modelr](/cran/modelr.md)
- [pkgdown](/cran/pkgdown.md)
- [png](/cran/png.md)
- [purrr](/cran/purrr.md)
- [ragg](/cran/ragg.md)
- [RColorBrewer](/cran/RColorBrewer.md)
- [rjags](/cran/rjags.md)
- [rmarkdown](/cran/rmarkdown.md)
- [rstan](/cran/rstan.md)
- [rstanarm](/cran/rstanarm.md)
- [rstantools](/cran/rstantools.md)
- [runjags](/cran/runjags.md)
- [svglite](/cran/svglite.md)
- [testthat](/cran/testthat.md)
- [transformr](/cran/transformr.md)
- [vdiffr](/cran/vdiffr.md)

**Dependent packages (11)**

| Package | Title | Downloads in 30 days |
| --- | --- | ---: |
| [trialr](/cran/trialr.md) | Clinical Trial Designs in 'rstan' | 545 |
| [rcbayes](/cran/rcbayes.md) | Estimate Rogers-Castro Migration Age Schedules with Bayesian Models | 368 |
| [bennu](/cran/bennu.md) | Bayesian Estimation of Naloxone Kit Number Under-Reporting | 358 |
| [fido](/cran/fido.md) | Bayesian Multinomial Logistic Normal Regression | 354 |
| [idealstan](/cran/idealstan.md) | Robust Measurement with 'Stan' | 343 |
| [surveil](/cran/surveil.md) | Time Series Models for Disease Surveillance | 324 |
| [tidytreatment](/cran/tidytreatment.md) | Tidy Methods for Bayesian Treatment Effect Models | 310 |
| [mcmsupply](/cran/mcmsupply.md) | Estimating Public and Private Sector Contraceptive Market Supply Shares | 300 |
| [reslr](/cran/reslr.md) | Modelling Relative Sea Level Data | 289 |
| [hmetad](/cran/hmetad.md) | Fit the Meta-D' Model of Confidence Ratings Using 'brms' | 284 |
| [BayesGrowth](/cran/BayesGrowth.md) | Estimate Fish Growth Using MCMC Analysis | 260 |

## Code

[Method](/about/code-metrics.md)

Selected function: `parse_variable_spec`

- Kind: Internal R function
- File: R/spread_draws.R, line 653
- Lines: 50
- Complexity: 3
- Covered by tests: 100%

Called by 5: [`spread_draws_`](/cran/tidybayes.md?fn=spread_draws_&view=focus#code) (100% of lines run by tests), [`spread_rvars`](/cran/tidybayes.md?fn=spread_rvars&view=focus#code) (100% of lines run by tests), [`unspread_draws_`](/cran/tidybayes.md?fn=unspread_draws_&view=focus#code) (100% of lines run by tests), [`gather_rvars`](/cran/tidybayes.md?fn=gather_rvars&view=focus#code) (100% of lines run by tests), [`ungather_draws_`](/cran/tidybayes.md?fn=ungather_draws_&view=focus#code) (100% of lines run by tests)

Calls 3: [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code) (100% of lines run by tests), [`map2_`](/cran/tidybayes.md?fn=map2_&view=focus#code) (100% of lines run by tests), [`all_names`](/cran/tidybayes.md?fn=all_names&view=focus#code) (100% of lines run by tests)

Paths: 2 steps each way.

Called by 5:

- [`spread_draws_`](/cran/tidybayes.md?fn=spread_draws_&view=focus#code), called by 2
  - [`spread_draws`](/cran/tidybayes.md?fn=spread_draws&view=focus#code), called by 3
  - [`gather_draws`](/cran/tidybayes.md?fn=gather_draws&view=focus#code), called by 1
- [`spread_rvars`](/cran/tidybayes.md?fn=spread_rvars&view=focus#code)
- [`unspread_draws_`](/cran/tidybayes.md?fn=unspread_draws_&view=focus#code), called by 1
  - [`unspread_draws`](/cran/tidybayes.md?fn=unspread_draws&view=focus#code), called by 1
- [`gather_rvars`](/cran/tidybayes.md?fn=gather_rvars&view=focus#code)
- [`ungather_draws_`](/cran/tidybayes.md?fn=ungather_draws_&view=focus#code), called by 1
  - [`ungather_draws`](/cran/tidybayes.md?fn=ungather_draws&view=focus#code), called by 1

Calls 3:

- [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code)
- [`map2_`](/cran/tidybayes.md?fn=map2_&view=focus#code)
- [`all_names`](/cran/tidybayes.md?fn=all_names&view=focus#code), calls 1
  - [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code)

The open file in the files map is `R/spread_draws.R`.

- Functions: 10
- Lines: 443
- Calls that stay inside it: 8
- Calls to other files: 11, to 2
- Calls from other files: 10, from 6

It calls: `R/util.R` (10 calls), `R/tidy_draws.R` (1 call)

Called from: `R/deprecated.R` (3 calls), `R/gather_draws.R` (2 calls), `R/spread_rvars.R` (2 calls), `R/gather_rvars.R` (1 call), `R/ungather_draws.R` (1 call), `R/unspread_draws.R` (1 call)

| Function in spread_draws.R | Calls in other files |
| --- | --- |
| [`parse_variable_spec`](/cran/tidybayes.md?fn=parse_variable_spec&view=focus#code) selected | [`all_names`](/cran/tidybayes.md?fn=all_names&view=focus#code), [`map2_`](/cran/tidybayes.md?fn=map2_&view=focus#code), [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code) |
| [`nest_dimensions_`](/cran/tidybayes.md?fn=nest_dimensions_&view=focus#code) | [`fct_inorder_`](/cran/tidybayes.md?fn=fct_inorder_&view=focus#code), [`map2_`](/cran/tidybayes.md?fn=map2_&view=focus#code) |
| [`spread_draws`](/cran/tidybayes.md?fn=spread_draws&view=focus#code) | [`.Deprecated_argument_alias`](/cran/tidybayes.md?fn=.Deprecated_argument_alias&view=focus#code), [`reduce_`](/cran/tidybayes.md?fn=reduce_&view=focus#code) |
| [`spread_draws_long_`](/cran/tidybayes.md?fn=spread_draws_long_&view=focus#code) | [`escape_regex`](/cran/tidybayes.md?fn=escape_regex&view=focus#code), [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code) |
| [`sample_draws_from_model_`](/cran/tidybayes.md?fn=sample_draws_from_model_&view=focus#code) | [`tidy_draws`](/cran/tidybayes.md?fn=tidy_draws&view=focus#code) |

**More functions (5)**

| Function in spread_draws.R | Calls in other files |
| --- | --- |
| [`spread_draws_`](/cran/tidybayes.md?fn=spread_draws_&view=focus#code) | [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code) |
| [`abind0`](/cran/tidybayes.md?fn=abind0&view=focus#code) | nothing outside this file |
| [`all_elements_identical`](/cran/tidybayes.md?fn=all_elements_identical&view=focus#code) | nothing outside this file |
| [`convert_cols_to_types_from_model`](/cran/tidybayes.md?fn=convert_cols_to_types_from_model&view=focus#code) | nothing outside this file |
| [`printable_variable_names`](/cran/tidybayes.md?fn=printable_variable_names&view=focus#code) | nothing outside this file |


6 files with no calls to or from another: `R/combine_chains.R`, `R/flip_aes.R`, `R/recover_types.R`, `R/sample_draws.R`, `R/summarise_draws.R`, `R/testthat.R`.

The whole package has 201 function names in 34 files and 199 calls between them. Most calls between files: `R/deprecated.R` and `R/util.R` (11 calls), `R/spread_draws.R` and `R/util.R` (10 calls), `R/tidy_draws.R` and `R/util.R` (9 calls), `R/predicted_draws.R` and `R/util.R` (5 calls), `R/residual_draws.R` and `R/util.R` (4 calls).

Graph: the whole call graph has 158 function names that take part in a call and 199 calls between them, set out in 7 layers with callers before what they call. 43 function names have no calls and are left out. Called by the most functions: `stop0` (20), `.Deprecated_argument_alias` (13), `tidy_draws` (12), `deparse0` (8), `pred_draws_` (8). Calling the most functions: `gather_draws` (5), `spread_draws` (4), `spread_draws_` (4), `spread_draws_long_` (4), `as_data_list.factor` (4).

Most connected functions: [`stop0`](/cran/tidybayes.md?fn=stop0&view=focus#code) 20, [`.Deprecated_argument_alias`](/cran/tidybayes.md?fn=.Deprecated_argument_alias&view=focus#code) 14, [`tidy_draws`](/cran/tidybayes.md?fn=tidy_draws&view=focus#code) 12, [`pred_draws_`](/cran/tidybayes.md?fn=pred_draws_&view=focus#code) 10, [`pred_rvars_`](/cran/tidybayes.md?fn=pred_rvars_&view=focus#code) 9, [`deparse0`](/cran/tidybayes.md?fn=deparse0&view=focus#code) 8

To select another function, add ?fn=NAME to this address.

The call graph also has an address of its own: /cran/tidybayes/graph.md?fn=parse_variable_spec&view=focus

- Functions: 201
- Public exports: 221
- Lines of R code: 6,536
- Median complexity: 1

**Functions (201)**

| Function (sorted, low to high) | Kind | File | Lines | Complexity | Covered |
| --- | --- | --- | ---: | ---: | ---: |
| [`add_draws`](/cran/tidybayes.md?fn=add_draws#code) | Public | R/add_draws.R | 7 | 1 | 100% |
| [`add_epred_draws`](/cran/tidybayes.md?fn=add_epred_draws#code) | Public | R/epred_draws.R | 11 | 1 | 100% |
| [`add_epred_rvars`](/cran/tidybayes.md?fn=add_epred_rvars#code) | Public | R/epred_rvars.R | 9 | 1 | 100% |
| [`add_fitted_draws`](/cran/tidybayes.md?fn=add_fitted_draws#code) | Public | R/deprecated.R | 3 | 1 | 100% |
| [`add_fitted_samples`](/cran/tidybayes.md?fn=add_fitted_samples#code) | Public | R/deprecated.R | 4 | 1 |  |
| [`add_linpred_draws`](/cran/tidybayes.md?fn=add_linpred_draws#code) | Public | R/linpred_draws.R | 14 | 1 | 100% |
| [`add_linpred_rvars`](/cran/tidybayes.md?fn=add_linpred_rvars#code) | Public | R/linpred_rvars.R | 9 | 1 | 100% |
| [`add_predicted_draws`](/cran/tidybayes.md?fn=add_predicted_draws#code) | Public | R/predicted_draws.R | 12 | 1 | 100% |
| [`add_predicted_rvars`](/cran/tidybayes.md?fn=add_predicted_rvars#code) | Public | R/predicted_rvars.R | 9 | 1 | 100% |
| [`add_predicted_samples`](/cran/tidybayes.md?fn=add_predicted_samples#code) | Public | R/deprecated.R | 4 | 1 |  |
| [`add_residual_draws`](/cran/tidybayes.md?fn=add_residual_draws#code) | Public | R/residual_draws.R | 12 | 1 | 100% |
| [`apply_prototypes`](/cran/tidybayes.md?fn=apply_prototypes#code) | Public | R/recover_types.R | 4 | 1 |  |

This page lists 1 to 12 of 201 functions. [Next](/cran/tidybayes.md?sort=name&order=asc&fpage=2#functions)

**Size and composition**

#### Lines by kind (17,884)

| Kind | Lines | Share |
| --- | ---: | ---: |
| R code | 6,536 | 37% |
| Tests | 3,959 | 22% |
| Documentation | 3,471 | 19% |
| Guides | 3,918 | 22% |

#### Lines by language

| Language | Lines | Share |
| --- | ---: | ---: |
| R | 10,495 | 59% |
| Vignettes | 3,918 | 22% |
| Rd | 3,471 | 19% |

Languages are counted from file extensions.

- Files: 182
- R functions: 201
- Object systems: S3: 57 methods
- Deprecated functions: 48

**Complexity**

- Median: 1
- Mean: 1.75
- Highest: 15
- Median lines per function: 9

_About complexity: Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only._

**Call graph figures**

- R functions: 201
- Calls: 199
- Unconnected: 43
- Groups: 9

**Growth (16 releases)**

Total lines by release: from 12,837 (on 2 Aug 2018) to 17,884 (on 15 Sep 2024). The lowest is 12,837 and the highest is 23,730.

**Release changes**

[Both releases side by side](/cran/tidybayes/compare/3.0.6...3.0.7.md)

**3.0.6 to 3.0.7**, 12 Aug 2023 to 15 Sep 2024

- Files changed: 161
- Lines added: 37,031
- Lines deleted: 36,880
- Exports: No change

**Changed measures (15)**

| Measure | Subject | Before | After |
| --- | --- | ---: | ---: |
| Internal functions | Structure | 109 | 110 |
| Total lines | Structure | 17,740 | 17,884 |
| Lines of R code | Structure | 6,490 | 6,536 |
| Lines of tests | Structure | 3,884 | 3,959 |
| R functions | Languages | 200 | 201 |
| Lines of documentation | Documentation | 3,448 | 3,471 |
| Test cases | Testing | 198 | 201 |
| Test lines per line of code | Testing | 0.76 | 0.76 |
| Mean complexity | Complexity | 1.75 | 1.75 |
| Highest complexity | Complexity | 14 | 15 |
| Lines per function (mean) | Complexity | 14.05 | 14.22 |
| Functions (nodes) | Call graph | 200 | 201 |
| Mean connections | Call graph | 1.99 | 1.98 |
| Functions with no connections | Call graph | 42 | 43 |
| S3 methods | Object system | 54 | 57 |

**Most changed files (12 of 161)**

| File | Lines added | Lines deleted |
| --- | ---: | ---: |
| `inst/doc/tidybayes.html` | 3,979 | 3,988 |
| `inst/doc/tidy-brms.html` | 2,837 | 2,837 |
| `inst/doc/tidy-rstanarm.html` | 2,581 | 2,581 |
| `inst/doc/tidy-posterior.html` | 1,416 | 1,418 |
| `inst/doc/tidybayes-residuals.html` | 1,147 | 1,147 |
| `R/deprecated.R` | 1,082 | 1,082 |
| `inst/doc/tidy-brms.Rmd` | 946 | 946 |
| `vignettes/tidy-brms.Rmd` | 946 | 946 |
| `inst/doc/tidy-posterior.Rmd` | 816 | 816 |
| `vignettes/tidy-posterior.Rmd` | 816 | 816 |
| `inst/doc/tidybayes.Rmd` | 797 | 797 |
| `vignettes/tidybayes.Rmd` | 797 | 797 |

## Tests

[Method](/about/coverage.md)

The tests ran and coverage was measured.

- Lines run by tests: 80.2%
- Expressions run by tests: 83.3%
- Test cases: 201
- Exports named in tests: 29%

**Coverage by file (34)**

34 files measured, least covered first.

| File | Lines | Run by tests | Not run | Coverage |
|---|---:|---:|---:|---:|
| `R/predict_curve.R`, 2 functions | 19 | 0 | 19 | 0% |
| `R/density_bins.R`, 2 functions | 17 | 0 | 17 | 0% |
| `R/deprecated.R`, 34 functions | 196 | 33 | 163 | 17% |
| `R/recover_types.R`, 6 functions | 33 | 19 | 14 | 58% |
| `R/flip_aes.R`, 5 functions | 13 | 8 | 5 | 62% |
| `R/tidy_draws.R`, 15 functions | 118 | 84 | 34 | 71% |
| `R/util.R`, 20 functions | 76 | 59 | 17 | 78% |
| `R/testthat.R`, 2 functions | 5 | 4 | 1 | 80% |
| `R/spread_rvars.R`, 3 functions | 71 | 57 | 14 | 80% |
| `R/compose_data.R`, 15 functions | 89 | 82 | 7 | 92% |
| `R/predicted_draws.R`, 9 functions | 135 | 128 | 7 | 95% |
| `R/gather_emmeans_draws.R`, 3 functions | 28 | 27 | 1 | 96% |
| `R/add_draws.R`, 3 functions | 15 | 15 | 0 | 100% |
| `R/combine_chains.R`, 1 function | 9 | 9 | 0 | 100% |
| `R/compare_levels.R`, 2 functions | 46 | 46 | 0 | 100% |
| `R/emmeans_comparison.R`, 1 function | 16 | 16 | 0 | 100% |
| `R/epred_draws.R`, 5 functions | 25 | 25 | 0 | 100% |
| `R/epred_rvars.R`, 5 functions | 26 | 26 | 0 | 100% |
| `R/gather_draws.R`, 1 function | 14 | 14 | 0 | 100% |
| `R/gather_pairs.R`, 2 functions | 31 | 31 | 0 | 100% |
| `R/gather_rvars.R`, 2 functions | 18 | 18 | 0 | 100% |
| `R/gather_variables.R`, 1 function | 9 | 9 | 0 | 100% |
| `R/get_variables.R`, 3 functions | 6 | 6 | 0 | 100% |
| `R/linpred_draws.R`, 5 functions | 42 | 42 | 0 | 100% |
| `R/linpred_rvars.R`, 5 functions | 26 | 26 | 0 | 100% |
| `R/nest_rvars.R`, 2 functions | 17 | 17 | 0 | 100% |
| `R/predicted_rvars.R`, 8 functions | 63 | 63 | 0 | 100% |
| `R/residual_draws.R`, 4 functions | 20 | 20 | 0 | 100% |
| `R/sample_draws.R`, 1 function | 5 | 5 | 0 | 100% |
| `R/spread_draws.R`, 10 functions | 224 | 224 | 0 | 100% |
| `R/summarise_draws.R`, 1 function | 3 | 3 | 0 | 100% |
| `R/ungather_draws.R`, 2 functions | 33 | 33 | 0 | 100% |
| `R/unspread_draws.R`, 2 functions | 33 | 33 | 0 | 100% |
| `R/x_at_y.R`, 1 function | 31 | 31 | 0 | 100% |

**Coverage run**

- Lines counted: 1,512
- Lines the tests ran: 1,213
- Tests passed: Yes
- Measured with: covr 3.6.5 on R 4.6.1

**Test suite**

- Has tests: Yes
- Test frameworks: testthat
- Test cases: 201
- Snapshot tests: 15
- Lines of tests: 3,959
- Test lines per line of code: 0.76

## Documentation

[Method](/about/code-metrics.md)

- Exports documented: 100%
- Arguments documented: 99.3%
- Return value documented: 80%
- Help pages with examples: 85.7%
- Examples run in checks: 54.2%

**Guides (5)**

- [Using tidy data with Bayesian models](https://cran.r-project.org/web/packages/tidybayes/vignettes/tidybayes.html)
- [Extracting and visualizing tidy draws from brms models](https://cran.r-project.org/web/packages/tidybayes/vignettes/tidy-brms.html)
- [Extracting and visualizing tidy draws from rstanarm models](https://cran.r-project.org/web/packages/tidybayes/vignettes/tidy-rstanarm.html)
- [Extracting and visualizing tidy residuals from Bayesian models](https://cran.r-project.org/web/packages/tidybayes/vignettes/tidybayes-residuals.html)
- [Using tidybayes with the posterior package](https://cran.r-project.org/web/packages/tidybayes/vignettes/tidy-posterior.html)

**Other documentation**

- README: No
- Release notes file: Yes
- Help pages: 28
- Lines of documentation: 3,471

## People

[Method](/about/author-identity.md)

- [Matthew Kay](/people/Matthew+Kay.md): Maintainer since 1.0.1 (2018), author
- [Timothy Mastny](/people/Timothy+Mastny.md): Contributor

## Repository

[Method](/about/repo-signals.md#figures)

[mjskay](/repos/mjskay.md) / [tidybayes](https://github.com/mjskay/tidybayes) on github.com

- Stars: 749 (up 0.13% on 30 days ago, the better direction)
- Forks: 63
- Open issues: 59
- Last commit: 17 Sep 2024

**Activity**

- Commits: 1,060
- Open pull requests: 4
- Tagged releases: 17
- Latest tagged release: v3.0.7, 16 Sep 2024
- In development: Default branch at 3.0.7.9000, ahead of CRAN 3.0.7 (checked 2026-10-25)
- Issues closed in: 8 days (median)
- Pull requests closed in: 13 days (median)
- Pull requests merged: 57%
- Created: 4 Apr 2015
- Licence file reads as: GPL-3.0

**Development practices (10)**

| Kind | Found |
| --- | --- |
| Continuous integration | GitHub Actions, R CMD check workflow The `R CMD check` workflow runs on Linux, macOS and Windows, and on R-devel |
| Docs source | README.Rmd, pkgdown GitHub Pages site last deployed 2024-09-17 pkgdown site last built 2024-09-15 |
| Coverage | Coverage reporting (Codecov), .covrignore |
| CRAN release process | cran-comments.md |
| Lint, format, editor | lintr |
| Git structural | .gitattributes |

[Across mjskay](/repos/mjskay.md#practices)

## History

[Method](/about/archive.md)

The line runs from the first release of tidybayes on 2 Aug 2018 to 28 Oct 2026 and marks all 16 of its releases.

| Version | Released | R |
| --- | --- | ---: |
| [3.0.7](/cran/tidybayes/v/3.0.7.md) current | 15 Sep 2024 | 4.4.1 |
| [3.0.6](/cran/tidybayes/v/3.0.6.md) | 13 Aug 2023 | 4.3.1 |
| [3.0.4](/cran/tidybayes/v/3.0.4.md) | 14 Mar 2023 | 4.2.2 |
| [3.0.3](/cran/tidybayes/v/3.0.3.md) | 4 Feb 2023 | 4.2.2 |
| [3.0.2](/cran/tidybayes/v/3.0.2.md) | 5 Jan 2022 | 4.1.2 |
| [3.0.1](/cran/tidybayes/v/3.0.1.md) | 22 Aug 2021 | 4.1.1 |
| [3.0.0](/cran/tidybayes/v/3.0.0.md) | 26 Jul 2021 | 4.1.0 |
| [2.3.1](/cran/tidybayes/v/2.3.1.md) | 2 Nov 2020 | 4.0.3 |

**Earlier versions (8)**

| Version | Released | R |
| --- | --- | ---: |
| [2.1.1](/cran/tidybayes/v/2.1.1.md) | 19 Jun 2020 | 4.0.0 |
| [2.0.3](/cran/tidybayes/v/2.0.3.md) | 4 Apr 2020 | 3.6.3 |
| [2.0.2](/cran/tidybayes/v/2.0.2.md) | 19 Mar 2020 | 3.6.3 |
| [2.0.1](/cran/tidybayes/v/2.0.1.md) | 28 Jan 2020 | 3.6.2 |
| [1.1.0](/cran/tidybayes/v/1.1.0.md) | 2 Jun 2019 | 3.6.0 |
| [1.0.4](/cran/tidybayes/v/1.0.4.md) | 19 Feb 2019 | 3.5.2 |
| [1.0.3](/cran/tidybayes/v/1.0.3.md) | 22 Oct 2018 | 3.5.0 |
| [1.0.1](/cran/tidybayes/v/1.0.1.md) | 2 Aug 2018 | 3.5.0 |

**Release notes (3.0.7)**

New features:

- Add support for `draw_indices` parameter in `spread_draws()` and `gather_draws()`. (#323)

Bug fixes:

- Support for matrix columns in `nest_rvars()` and `unnest_rvars()`. (#316)
- Fix some named dimensions being converted to numeric indices in `spread_draws()` on R >= 4.5.

---

R Observatory is independent of the R Project, CRAN and Bioconductor. The same page for people is at /cran/tidybayes, and every address is listed at /llms.txt.
