From 8fe9de7bcbc4a842e9a41b46b145a5df08353f00 Mon Sep 17 00:00:00 2001 From: Joe Thorley Date: Tue, 14 Jul 2026 08:23:14 -0700 Subject: [PATCH] Add FAQ on subsetting fitted distributions with the [ operator Fixes poissonconsulting/ssdtools#148 Co-Authored-By: Claude Fable 5 --- vignettes/faqs.Rmd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vignettes/faqs.Rmd b/vignettes/faqs.Rmd index 7fae033af..1a71c6ae2 100644 --- a/vignettes/faqs.Rmd +++ b/vignettes/faqs.Rmd @@ -39,6 +39,20 @@ ssd_plot(ssddata::ccme_boron, ssdtools::boron_pred, label = "Species", shape = " ggplot2::scale_x_continuous(latex2exp::TeX("Boron $(\\mu g$/L)$"), breaks = c(1, 10, 100, 1000, 10000)) ``` +### How can I select a subset of the fitted distributions? + +Use the `[` operator with the distribution names (or their positions) to get a `fitdists` object with just those distributions. + +```{r} +library(ssdtools) + +dists <- ssd_fit_dists(ssddata::ccme_boron) +names(dists) + +subset <- dists[c("gamma", "lnorm")] +names(subset) +``` +
```{r, results = "asis", echo = FALSE}