From 8d07dffaec9f0f14e00b24a4f0b413f67a6961b2 Mon Sep 17 00:00:00 2001 From: mitchelloharawild Date: Fri, 2 Sep 2022 16:08:40 +1000 Subject: [PATCH] Update documentation with new lifecycle badges Resolves #60 --- DESCRIPTION | 2 +- NAMESPACE | 1 + R/dist_bernoulli.R | 3 +- R/dist_beta.R | 3 +- R/dist_binomial.R | 3 +- R/dist_burr.R | 3 +- R/dist_categorical.R | 3 +- R/dist_cauchy.R | 3 +- R/dist_chisq.R | 3 +- R/dist_degenerate.R | 3 +- R/dist_exponential.R | 3 +- R/dist_f.R | 3 +- R/dist_gamma.R | 3 +- R/dist_geometric.R | 4 +- R/dist_gumbel.R | 3 +- R/dist_hypergeometric.R | 3 +- R/dist_inverse_exponential.R | 3 +- R/dist_inverse_gamma.R | 3 +- R/dist_inverse_gaussian.R | 3 +- R/dist_logarithmic.R | 3 +- R/dist_logistic.R | 3 +- R/dist_lognormal.R | 3 +- R/dist_missing.R | 3 +- R/dist_multinomial.R | 3 +- R/dist_multivariate_normal.R | 3 +- R/dist_negative_binomial.R | 3 +- R/dist_normal.R | 3 +- R/dist_pareto.R | 3 +- R/dist_percentile.R | 3 +- R/dist_poisson.R | 3 +- R/dist_poisson_inverse_gaussian.R | 3 +- R/dist_sample.R | 3 +- R/dist_student_t.R | 3 +- R/dist_studentized_range.R | 3 +- R/dist_uniform.R | 3 +- R/dist_weibull.R | 3 +- R/dist_wrap.R | 3 +- R/distribution.R | 63 ++++++++++++++++++++-------- R/distributional-package.R | 1 + R/geom_hilo.R | 14 ++++++- R/hilo.R | 9 ++++ R/inflated.R | 3 +- R/mixture.R | 3 +- R/plot.R | 3 +- R/scale-level.R | 6 +-- R/transformed.R | 3 +- R/truncated.R | 3 +- man/autoplot.distribution.Rd | 5 +-- man/cdf.Rd | 2 +- man/covariance.Rd | 2 + man/covariance.distribution.Rd | 5 +-- man/density.distribution.Rd | 5 +-- man/dist_bernoulli.Rd | 8 ++-- man/dist_beta.Rd | 2 +- man/dist_binomial.Rd | 8 ++-- man/dist_burr.Rd | 2 +- man/dist_categorical.Rd | 8 ++-- man/dist_cauchy.Rd | 8 ++-- man/dist_chisq.Rd | 8 ++-- man/dist_degenerate.Rd | 8 ++-- man/dist_exponential.Rd | 2 +- man/dist_f.Rd | 2 +- man/dist_gamma.Rd | 8 ++-- man/dist_geometric.Rd | 3 +- man/dist_gumbel.Rd | 8 ++-- man/dist_hypergeometric.Rd | 8 ++-- man/dist_inflated.Rd | 2 +- man/dist_inverse_exponential.Rd | 2 +- man/dist_inverse_gamma.Rd | 2 +- man/dist_inverse_gaussian.Rd | 2 +- man/dist_logarithmic.Rd | 2 +- man/dist_logistic.Rd | 8 ++-- man/dist_lognormal.Rd | 8 ++-- man/dist_missing.Rd | 5 +-- man/dist_mixture.Rd | 2 +- man/dist_multinomial.Rd | 8 ++-- man/dist_multivariate_normal.Rd | 2 +- man/dist_negative_binomial.Rd | 8 ++-- man/dist_normal.Rd | 8 ++-- man/dist_pareto.Rd | 2 +- man/dist_percentile.Rd | 2 +- man/dist_poisson.Rd | 6 +-- man/dist_poisson_inverse_gaussian.Rd | 2 +- man/dist_sample.Rd | 2 +- man/dist_student_t.Rd | 8 ++-- man/dist_studentized_range.Rd | 8 ++-- man/dist_transformed.Rd | 5 +-- man/dist_truncated.Rd | 5 +-- man/dist_uniform.Rd | 6 +-- man/dist_weibull.Rd | 8 ++-- man/dist_wrap.Rd | 5 +-- man/family.distribution.Rd | 2 +- man/figures/lifecycle-superseded.svg | 1 + man/generate.distribution.Rd | 5 +-- man/geom_hilo_linerange.Rd | 9 ++-- man/geom_hilo_ribbon.Rd | 9 ++-- man/guide_level.Rd | 6 +-- man/hdr.distribution.Rd | 5 +-- man/hilo.Rd | 5 ++- man/hilo.distribution.Rd | 5 +-- man/is-distribution.Rd | 3 +- man/kurtosis.Rd | 2 +- man/likelihood.Rd | 2 +- man/mean.distribution.Rd | 5 +-- man/median.distribution.Rd | 5 +-- man/new_dist.Rd | 5 ++- man/new_hilo.Rd | 5 ++- man/parameters.Rd | 2 +- man/quantile.distribution.Rd | 5 +-- man/skewness.Rd | 2 +- man/support.Rd | 2 +- man/variance.Rd | 2 + man/variance.distribution.Rd | 5 +-- 113 files changed, 313 insertions(+), 216 deletions(-) create mode 100644 man/figures/lifecycle-superseded.svg diff --git a/DESCRIPTION b/DESCRIPTION index 46a5136a..a793a6d1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -51,5 +51,5 @@ URL: https://pkg.mitchelloharawild.com/distributional/, https://github.com/mitch BugReports: https://github.com/mitchelloharawild/distributional/issues Encoding: UTF-8 Language: en-GB -Roxygen: list(markdown = TRUE, roclets=c('rd', 'collate', 'namespace')) +Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.1 diff --git a/NAMESPACE b/NAMESPACE index c7d06975..60f64a45 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -514,6 +514,7 @@ importFrom(ggplot2,waiver) importFrom(grDevices,col2rgb) importFrom(grDevices,rgb) importFrom(lifecycle,deprecate_soft) +importFrom(lifecycle,deprecated) importFrom(stats,density) importFrom(stats,family) importFrom(stats,median) diff --git a/R/dist_bernoulli.R b/R/dist_bernoulli.R index d47d58d1..296f3aaf 100644 --- a/R/dist_bernoulli.R +++ b/R/dist_bernoulli.R @@ -1,6 +1,7 @@ #' The Bernoulli distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Bernoulli distributions are used to represent events like coin flips #' when there is single trial that is either successful or unsuccessful. diff --git a/R/dist_beta.R b/R/dist_beta.R index 9a712a70..c6dbca0e 100644 --- a/R/dist_beta.R +++ b/R/dist_beta.R @@ -1,6 +1,7 @@ #' The Beta distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param shape1,shape2 The non-negative shape parameters of the Beta distribution. #' diff --git a/R/dist_binomial.R b/R/dist_binomial.R index 7243b7e8..b259b390 100644 --- a/R/dist_binomial.R +++ b/R/dist_binomial.R @@ -1,6 +1,7 @@ #' The Binomial distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Binomial distributions are used to represent situations can that can #' be thought as the result of \eqn{n} Bernoulli experiments (here the diff --git a/R/dist_burr.R b/R/dist_burr.R index fc39bd4d..8fd4d171 100644 --- a/R/dist_burr.R +++ b/R/dist_burr.R @@ -1,6 +1,7 @@ #' The Burr distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dburr #' diff --git a/R/dist_categorical.R b/R/dist_categorical.R index 5fd4dbf2..b65f9669 100644 --- a/R/dist_categorical.R +++ b/R/dist_categorical.R @@ -1,6 +1,7 @@ #' The Categorical distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Categorical distributions are used to represent events with multiple #' outcomes, such as what number appears on the roll of a dice. This is also diff --git a/R/dist_cauchy.R b/R/dist_cauchy.R index 45de0a7a..9db4b89a 100644 --- a/R/dist_cauchy.R +++ b/R/dist_cauchy.R @@ -1,6 +1,7 @@ #' The Cauchy distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' The Cauchy distribution is the student's t distribution with one degree of #' freedom. The Cauchy distribution does not have a well defined mean or diff --git a/R/dist_chisq.R b/R/dist_chisq.R index a81ed662..ffd30b85 100644 --- a/R/dist_chisq.R +++ b/R/dist_chisq.R @@ -1,6 +1,7 @@ #' The (non-central) Chi-Squared Distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Chi-square distributions show up often in frequentist settings #' as the sampling distribution of test statistics, especially diff --git a/R/dist_degenerate.R b/R/dist_degenerate.R index 0682d33e..878af357 100644 --- a/R/dist_degenerate.R +++ b/R/dist_degenerate.R @@ -1,6 +1,7 @@ #' The degenerate distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' The degenerate distribution takes a single value which is certain to be #' observed. It takes a single parameter, which is the value that is observed diff --git a/R/dist_exponential.R b/R/dist_exponential.R index 9684e92d..ffba42e0 100644 --- a/R/dist_exponential.R +++ b/R/dist_exponential.R @@ -1,6 +1,7 @@ #' The Exponential Distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams stats::dexp #' diff --git a/R/dist_f.R b/R/dist_f.R index ba0c9e2e..550dc05b 100644 --- a/R/dist_f.R +++ b/R/dist_f.R @@ -1,6 +1,7 @@ #' The F Distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams stats::df #' diff --git a/R/dist_gamma.R b/R/dist_gamma.R index 05036bda..7ed5464c 100644 --- a/R/dist_gamma.R +++ b/R/dist_gamma.R @@ -1,6 +1,7 @@ #' The Gamma distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Several important distributions are special cases of the Gamma #' distribution. When the shape parameter is `1`, the Gamma is an diff --git a/R/dist_geometric.R b/R/dist_geometric.R index e8ac38d4..5df50ed1 100644 --- a/R/dist_geometric.R +++ b/R/dist_geometric.R @@ -1,11 +1,13 @@ #' The Geometric Distribution #' +#' @description +#' `r lifecycle::badge('stable')` +#' #' The Geometric distribution can be thought of as a generalization #' of the [dist_bernoulli()] distribution where we ask: "if I keep flipping a #' coin with probability `p` of heads, what is the probability I need #' \eqn{k} flips before I get my first heads?" The Geometric #' distribution is a special case of Negative Binomial distribution. -#' \lifecycle{stable} #' #' @inheritParams stats::dgeom #' diff --git a/R/dist_gumbel.R b/R/dist_gumbel.R index 974ba68f..33be971b 100644 --- a/R/dist_gumbel.R +++ b/R/dist_gumbel.R @@ -1,6 +1,7 @@ #' The Gumbel distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' The Gumbel distribution is a special case of the Generalized Extreme Value #' distribution, obtained when the GEV shape parameter \eqn{\xi} is equal to 0. diff --git a/R/dist_hypergeometric.R b/R/dist_hypergeometric.R index ab48e648..c6b9760d 100644 --- a/R/dist_hypergeometric.R +++ b/R/dist_hypergeometric.R @@ -1,6 +1,7 @@ #' The Hypergeometric distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' To understand the HyperGeometric distribution, consider a set of #' \eqn{r} objects, of which \eqn{m} are of the type I and diff --git a/R/dist_inverse_exponential.R b/R/dist_inverse_exponential.R index f13e784b..9afe1a95 100644 --- a/R/dist_inverse_exponential.R +++ b/R/dist_inverse_exponential.R @@ -1,6 +1,7 @@ #' The Inverse Exponential distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dinvexp #' diff --git a/R/dist_inverse_gamma.R b/R/dist_inverse_gamma.R index d4859816..adf14371 100644 --- a/R/dist_inverse_gamma.R +++ b/R/dist_inverse_gamma.R @@ -1,6 +1,7 @@ #' The Inverse Gamma distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dinvgamma #' diff --git a/R/dist_inverse_gaussian.R b/R/dist_inverse_gaussian.R index 549b278a..2cf273a1 100644 --- a/R/dist_inverse_gaussian.R +++ b/R/dist_inverse_gaussian.R @@ -1,6 +1,7 @@ #' The Inverse Gaussian distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dinvgauss #' diff --git a/R/dist_logarithmic.R b/R/dist_logarithmic.R index 69e339be..3b19b4f5 100644 --- a/R/dist_logarithmic.R +++ b/R/dist_logarithmic.R @@ -1,6 +1,7 @@ #' The Logarithmic distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dlogarithmic #' diff --git a/R/dist_logistic.R b/R/dist_logistic.R index 11fcb866..4d7aef48 100644 --- a/R/dist_logistic.R +++ b/R/dist_logistic.R @@ -1,6 +1,7 @@ #' The Logistic distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' A continuous distribution on the real line. For binary outcomes #' the model given by \eqn{P(Y = 1 | X) = F(X \beta)} where diff --git a/R/dist_lognormal.R b/R/dist_lognormal.R index ca52b131..d38788b4 100644 --- a/R/dist_lognormal.R +++ b/R/dist_lognormal.R @@ -1,6 +1,7 @@ #' The log-normal distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' The log-normal distribution is a commonly used transformation of the Normal #' distribution. If \eqn{X} follows a log-normal distribution, then \eqn{\ln{X}} diff --git a/R/dist_missing.R b/R/dist_missing.R index 4c1b3c8f..15e82925 100644 --- a/R/dist_missing.R +++ b/R/dist_missing.R @@ -1,6 +1,7 @@ #' Missing distribution #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('maturing')` #' #' A placeholder distribution for handling missing values in a vector of #' distributions. diff --git a/R/dist_multinomial.R b/R/dist_multinomial.R index b3f8c4b2..0e3b72ad 100644 --- a/R/dist_multinomial.R +++ b/R/dist_multinomial.R @@ -1,6 +1,7 @@ #' The Multinomial distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' The multinomial distribution is a generalization of the binomial #' distribution to multiple categories. It is perhaps easiest to think diff --git a/R/dist_multivariate_normal.R b/R/dist_multivariate_normal.R index ac6271a0..906267bd 100644 --- a/R/dist_multivariate_normal.R +++ b/R/dist_multivariate_normal.R @@ -1,6 +1,7 @@ #' The multivariate normal distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param mu A list of numeric vectors for the distribution's mean. #' @param sigma A list of matrices for the distribution's variance-covariance matrix. diff --git a/R/dist_negative_binomial.R b/R/dist_negative_binomial.R index b61f3f55..6ad9c6bb 100644 --- a/R/dist_negative_binomial.R +++ b/R/dist_negative_binomial.R @@ -1,6 +1,7 @@ #' The Negative Binomial distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' A generalization of the geometric distribution. It is the number #' of failures in a sequence of i.i.d. Bernoulli trials before diff --git a/R/dist_normal.R b/R/dist_normal.R index 4eae9ac9..687250c2 100644 --- a/R/dist_normal.R +++ b/R/dist_normal.R @@ -1,6 +1,7 @@ #' The Normal distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' The Normal distribution is ubiquitous in statistics, partially because #' of the central limit theorem, which states that sums of i.i.d. random diff --git a/R/dist_pareto.R b/R/dist_pareto.R index 8c96db6c..65625094 100644 --- a/R/dist_pareto.R +++ b/R/dist_pareto.R @@ -1,6 +1,7 @@ #' The Pareto distribution #' -#' \lifecycle{questioning} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dpareto #' diff --git a/R/dist_percentile.R b/R/dist_percentile.R index fd9a2d03..2d9d411f 100644 --- a/R/dist_percentile.R +++ b/R/dist_percentile.R @@ -1,6 +1,7 @@ #' Percentile distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param x A list of values #' @param percentile A list of percentiles diff --git a/R/dist_poisson.R b/R/dist_poisson.R index ac2ab705..b80eb8dd 100644 --- a/R/dist_poisson.R +++ b/R/dist_poisson.R @@ -1,6 +1,7 @@ #' The Poisson Distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Poisson distributions are frequently used to model counts. #' diff --git a/R/dist_poisson_inverse_gaussian.R b/R/dist_poisson_inverse_gaussian.R index a3875bb3..97654187 100644 --- a/R/dist_poisson_inverse_gaussian.R +++ b/R/dist_poisson_inverse_gaussian.R @@ -1,6 +1,7 @@ #' The Poisson-Inverse Gaussian distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams actuar::dpoisinvgauss #' diff --git a/R/dist_sample.R b/R/dist_sample.R index 17c30eb7..84644412 100644 --- a/R/dist_sample.R +++ b/R/dist_sample.R @@ -1,6 +1,7 @@ #' Sampling distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param x A list of sampled values. #' diff --git a/R/dist_student_t.R b/R/dist_student_t.R index 41d2b8f3..2ca8d44d 100644 --- a/R/dist_student_t.R +++ b/R/dist_student_t.R @@ -1,6 +1,7 @@ #' The (non-central) location-scale Student t Distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' The Student's T distribution is closely related to the [Normal()] #' distribution, but has heavier tails. As \eqn{\nu} increases to \eqn{\infty}, diff --git a/R/dist_studentized_range.R b/R/dist_studentized_range.R index a0f8560b..5b7d015f 100644 --- a/R/dist_studentized_range.R +++ b/R/dist_studentized_range.R @@ -1,6 +1,7 @@ #' The Studentized Range distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Tukey's studentized range distribution, used for Tukey's #' honestly significant differences test in ANOVA. diff --git a/R/dist_uniform.R b/R/dist_uniform.R index d65cb6cc..df7cb418 100644 --- a/R/dist_uniform.R +++ b/R/dist_uniform.R @@ -1,6 +1,7 @@ #' The Uniform distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' A distribution with constant density on an interval. #' diff --git a/R/dist_weibull.R b/R/dist_weibull.R index 2a9c66d7..f15e1eab 100644 --- a/R/dist_weibull.R +++ b/R/dist_weibull.R @@ -1,6 +1,7 @@ #' The Weibull distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Generalization of the gamma distribution. Often used in survival and #' time-to-event analyses. diff --git a/R/dist_wrap.R b/R/dist_wrap.R index 2bc99bcf..3ff00546 100644 --- a/R/dist_wrap.R +++ b/R/dist_wrap.R @@ -1,6 +1,7 @@ #' Create a distribution from p/d/q/r style functions #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('maturing')` #' #' If a distribution is not yet supported, you can vectorise p/d/q/r functions #' using this function. `dist_wrap()` stores the distributions parameters, and diff --git a/R/distribution.R b/R/distribution.R index fa1ad7ea..ce143f1d 100644 --- a/R/distribution.R +++ b/R/distribution.R @@ -1,5 +1,11 @@ #' Create a new distribution #' +#' @description +#' `r lifecycle::badge('maturing')` +#' +#' Allows extension package developers to define a new distribution class +#' compatible with the distributional package. +#' #' @param ... Parameters of the distribution (named). #' @param class The class of the distribution for S3 dispatch. #' @param dimnames The names of the variables in the distribution (optional). @@ -45,7 +51,8 @@ dimnames.distribution <- function(x){ #' The probability density/mass function #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Computes the probability density function for a continuous distribution, or #' the probability mass function for a discrete distribution. @@ -74,7 +81,8 @@ log_density.distribution <- function(x, at, ...){ #' Distribution Quantiles #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Computes the quantiles of a distribution. #' @@ -101,7 +109,8 @@ log_quantile.distribution <- function(x, p, ...){ #' The cumulative distribution function #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @inheritParams density.distribution #' @param q The quantile at which the cdf is calculated. @@ -129,7 +138,8 @@ log_cdf.distribution <- function(x, q, ...){ #' Randomly sample values from a distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Generate random samples from probability distributions. #' @@ -151,7 +161,8 @@ generate.distribution <- function(x, times, ...){ #' The (log) likelihood of a sample matching a distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param x The distribution(s). #' @param ... Additional arguments used by methods. @@ -191,7 +202,8 @@ log_likelihood.distribution <- function(x, sample, ...){ #' Extract the parameters of a distribution #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('experimental')` #' #' @param x The distribution(s). #' @param ... Additional arguments used by methods. @@ -220,7 +232,8 @@ parameters.distribution <- function(x, ...) { #' Extract the name of the distribution family #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('experimental')` #' #' @param object The distribution(s). #' @param ... Additional arguments used by methods. @@ -242,7 +255,8 @@ family.distribution <- function(object, ...) { #' Region of support of a distribution #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('experimental')` #' #' @param x The distribution(s). #' @param ... Additional arguments used by methods. @@ -261,7 +275,8 @@ support.distribution <- function(x, ...) { #' Mean of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Returns the empirical mean of the probability distribution. If the method #' does not exist, the mean of a random sample will be returned. @@ -276,6 +291,9 @@ mean.distribution <- function(x, ...){ #' Variance #' +#' @description +#' `r lifecycle::badge('stable')` +#' #' A generic function for computing the variance of an object. #' #' @param x An object. @@ -315,7 +333,8 @@ variance.matrix <- function(x, ...){ #' Variance of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Returns the empirical variance of the probability distribution. If the method #' does not exist, the variance of a random sample will be returned. @@ -330,6 +349,9 @@ variance.distribution <- function(x, ...){ #' Covariance #' +#' @description +#' `r lifecycle::badge('stable')` +#' #' A generic function for computing the covariance of an object. #' #' @param x An object. @@ -355,7 +377,8 @@ covariance.numeric <- function(x, ...){ } #' Covariance of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Returns the empirical covariance of the probability distribution. If the #' method does not exist, the covariance of a random sample will be returned. @@ -370,7 +393,8 @@ covariance.distribution <- function(x, ...){ #' Skewness of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param x The distribution(s). #' @param ... Additional arguments used by methods. @@ -387,7 +411,8 @@ skewness.distribution <- function(x, ...){ #' Kurtosis of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param x The distribution(s). #' @param ... Additional arguments used by methods. @@ -404,7 +429,8 @@ kurtosis.distribution <- function(x, ...){ #' Median of a probability distribution #' -#' \lifecycle{stable} +#' @description +#' `r lifecycle::badge('stable')` #' #' Returns the median (50th percentile) of a probability distribution. This is #' equivalent to `quantile(x, p=0.5)`. @@ -421,7 +447,8 @@ median.distribution <- function(x, na.rm = FALSE, ...){ #' Probability intervals of a probability distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' Returns a `hilo` central probability interval with probability coverage of #' `size`. By default, the distribution's [`quantile()`] will be used to compute @@ -442,7 +469,8 @@ hilo.distribution <- function(x, size = 95, ...){ #' Highest density regions of probability distributions #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('maturing')` #' #' This function is highly experimental and will change in the future. In #' particular, improved functionality for object classes and visualisation tools @@ -545,8 +573,9 @@ vec_cast.character.distribution <- function(x, to, ...){ #' Test if the object is a distribution #' #' @description +#' `r lifecycle::badge('stable')` +#' #' This function returns `TRUE` for distributions and `FALSE` for all other objects. -#' \lifecycle{stable} #' #' @param x An object. #' diff --git a/R/distributional-package.R b/R/distributional-package.R index b16fbeb8..83123e69 100644 --- a/R/distributional-package.R +++ b/R/distributional-package.R @@ -5,6 +5,7 @@ # roxygen namespace tags. Modify with care! ## usethis namespace: start #' @importFrom lifecycle deprecate_soft +#' @importFrom lifecycle deprecated ## usethis namespace: end #' @import vctrs #' @import rlang diff --git a/R/geom_hilo.R b/R/geom_hilo.R index e32b9a39..a984bace 100644 --- a/R/geom_hilo.R +++ b/R/geom_hilo.R @@ -1,6 +1,11 @@ #' Ribbon plots for hilo intervals #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('deprecated')` +#' +#' This function is deprecated in favour of the ggdist package and will removed +#' in a future release of this package. Consider using [ggdist::stat_lineribbon()] or +#' [ggdist::geom_lineribbon()] as an appropriate alternative. #' #' `geom_hilo_ribbon()` displays the interval defined by a hilo object. The #' luminance of the shaded area indicates its confidence level. The shade colour @@ -81,7 +86,12 @@ GeomHiloRibbon <- ggplot2::ggproto( #' Line ranges for hilo intervals #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('deprecated')` +#' +#' This function is deprecated in favour of the ggdist package and will removed +#' in a future release of this package. Consider using [ggdist::stat_slabinterval()] or +#' [ggdist::geom_slabinterval()] as an appropriate alternative. #' #' `geom_hilo_linerange()` displays the interval defined by a hilo object. The #' luminance of the shaded area indicates its confidence level. The shade colour diff --git a/R/hilo.R b/R/hilo.R index 54032fda..530bc873 100644 --- a/R/hilo.R +++ b/R/hilo.R @@ -1,5 +1,11 @@ #' Construct hilo intervals #' +#' @description +#' `r lifecycle::badge('stable')` +#' +#' Class constructor function to help with manually creating hilo interval +#' objects. +#' #' @param lower,upper A numeric vector of values for lower and upper limits. #' @param size Size of the interval between \[0, 100\]. #' @@ -30,6 +36,9 @@ new_hilo <- function(lower = double(), upper = double(), size = double()) { #' Compute intervals #' +#' @description +#' `r lifecycle::badge('stable')` +#' #' Used to extract a specified prediction interval at a particular confidence #' level from a distribution. #' diff --git a/R/inflated.R b/R/inflated.R index 9f9f27f2..62dfe1e1 100644 --- a/R/inflated.R +++ b/R/inflated.R @@ -1,6 +1,7 @@ #' Inflate a value of a probability distribution #' -#' \lifecycle{maturing} +#' @description +#' `r lifecycle::badge('stable')` #' #' @param dist The distribution(s) to inflate. #' @param prob The added probability of observing `x`. diff --git a/R/mixture.R b/R/mixture.R index 3db5b440..0c44e13a 100644 --- a/R/mixture.R +++ b/R/mixture.R @@ -1,6 +1,7 @@ #' Create a mixture of distributions #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('maturing')` #' #' @param ... Distributions to be used in the mixture. #' @param weights The weight of each distribution passed to `...`. diff --git a/R/plot.R b/R/plot.R index 448be04b..80557845 100644 --- a/R/plot.R +++ b/R/plot.R @@ -1,6 +1,7 @@ #' Plot a distribution #' -#' \lifecycle{deprecated} +#' @description +#' `r lifecycle::badge('defunct')` #' #' This function is now defunct and can no longer be used. Instead consider using #' the {ggdist} package to produce your own distribution plots. You can learn diff --git a/R/scale-level.R b/R/scale-level.R index 075e564d..cd87afaf 100644 --- a/R/scale-level.R +++ b/R/scale-level.R @@ -46,9 +46,9 @@ RangeLevel <- ggplot2::ggproto(NULL, NULL, #' The level guide shows the colour from the forecast intervals which is blended with the series colour. #' #' @inheritParams ggplot2::guide_colourbar -#' @param max_discrete The maximum number of levels to be shown using \code{\link[ggplot2]{guide_legend}}. -#' If the number of levels exceeds this value, level shades are shown with \code{\link[ggplot2]{guide_colourbar}}. -#' @param ... Further arguments passed onto either \code{\link[ggplot2]{guide_colourbar}} or \code{\link[ggplot2]{guide_legend}} +#' @param max_discrete The maximum number of levels to be shown using [ggplot2::guide_legend()]. +#' If the number of levels exceeds this value, level shades are shown with [ggplot2::guide_colourbar()]. +#' @param ... Further arguments passed onto either [ggplot2::guide_colourbar()] or [ggplot2::guide_legend()] #' #' @export guide_level <- function(title = waiver(), max_discrete = 5, ...) { diff --git a/R/transformed.R b/R/transformed.R index 33ff8d7e..aff6c74d 100755 --- a/R/transformed.R +++ b/R/transformed.R @@ -1,6 +1,7 @@ #' Modify a distribution with a transformation #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('maturing')` #' #' The [`density()`], [`mean()`], and [`variance()`] methods are approximate as #' they are based on numerical derivatives. diff --git a/R/truncated.R b/R/truncated.R index 3d07fd80..d09164eb 100644 --- a/R/truncated.R +++ b/R/truncated.R @@ -1,6 +1,7 @@ #' Truncate a distribution #' -#' \lifecycle{experimental} +#' @description +#' `r lifecycle::badge('stable')` #' #' Note that the samples are generated using inverse transform sampling, and the #' means and variances are estimated from samples. diff --git a/man/autoplot.distribution.Rd b/man/autoplot.distribution.Rd index 5cf2cdc8..c736d4f9 100644 --- a/man/autoplot.distribution.Rd +++ b/man/autoplot.distribution.Rd @@ -12,9 +12,8 @@ autoplot.distribution(x, ...) \item{...}{Unused.} } \description{ -\lifecycle{deprecated} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#defunct}{\figure{lifecycle-defunct.svg}{options: alt='[Defunct]'}}}{\strong{[Defunct]}} + This function is now defunct and can no longer be used. Instead consider using the {ggdist} package to produce your own distribution plots. You can learn more about how this plot can be produced using {ggdist} here: diff --git a/man/cdf.Rd b/man/cdf.Rd index d2982540..9e53fdaa 100644 --- a/man/cdf.Rd +++ b/man/cdf.Rd @@ -19,5 +19,5 @@ cdf(x, q, ..., log = FALSE) \item{log}{If \code{TRUE}, probabilities will be given as log probabilities.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } diff --git a/man/covariance.Rd b/man/covariance.Rd index ca623a30..96032e93 100644 --- a/man/covariance.Rd +++ b/man/covariance.Rd @@ -12,6 +12,8 @@ covariance(x, ...) \item{...}{Additional arguments used by methods.} } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + A generic function for computing the covariance of an object. } \seealso{ diff --git a/man/covariance.distribution.Rd b/man/covariance.distribution.Rd index f79c0d2d..4aaa2cb6 100644 --- a/man/covariance.distribution.Rd +++ b/man/covariance.distribution.Rd @@ -12,9 +12,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Returns the empirical covariance of the probability distribution. If the method does not exist, the covariance of a random sample will be returned. } diff --git a/man/density.distribution.Rd b/man/density.distribution.Rd index 5de95e85..979aab1a 100644 --- a/man/density.distribution.Rd +++ b/man/density.distribution.Rd @@ -16,9 +16,8 @@ \item{log}{If \code{TRUE}, probabilities will be given as log probabilities.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Computes the probability density function for a continuous distribution, or the probability mass function for a discrete distribution. } diff --git a/man/dist_bernoulli.Rd b/man/dist_bernoulli.Rd index 96dbbd1b..c0a9406c 100644 --- a/man/dist_bernoulli.Rd +++ b/man/dist_bernoulli.Rd @@ -11,14 +11,14 @@ dist_bernoulli(prob) value in \verb{[0, 1]}.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Bernoulli distributions are used to represent events like coin flips when there is single trial that is either successful or unsuccessful. The Bernoulli distribution is a special case of the \code{\link[=Binomial]{Binomial()}} distribution with \code{n = 1}. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_beta.Rd b/man/dist_beta.Rd index 9b9d27ea..26b16292 100644 --- a/man/dist_beta.Rd +++ b/man/dist_beta.Rd @@ -10,7 +10,7 @@ dist_beta(shape1, shape2) \item{shape1, shape2}{The non-negative shape parameters of the Beta distribution.} } \description{ -\lifecycle{maturing} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ dist <- dist_beta(shape1 = c(0.5, 5, 1, 2, 2), shape2 = c(0.5, 1, 3, 2, 5)) diff --git a/man/dist_binomial.Rd b/man/dist_binomial.Rd index 74843bbb..b0762256 100644 --- a/man/dist_binomial.Rd +++ b/man/dist_binomial.Rd @@ -15,9 +15,8 @@ Bernoulli distribution. Often called \code{n} in textbooks.} value in \verb{[0, 1]}.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Binomial distributions are used to represent situations can that can be thought as the result of \eqn{n} Bernoulli experiments (here the \eqn{n} is defined as the \code{size} of the experiment). The classical @@ -28,7 +27,8 @@ and the probability of having \eqn{x} equal results (\eqn{x} heads, for example), in \eqn{n} trials is given by the Binomial(n, p) distribution. The equation of the Binomial distribution is directly derived from the equation of the Bernoulli distribution. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_burr.Rd b/man/dist_burr.Rd index 9cb1b98c..1c4065d3 100644 --- a/man/dist_burr.Rd +++ b/man/dist_burr.Rd @@ -12,7 +12,7 @@ dist_burr(shape1, shape2, rate = 1, scale = 1/rate) \item{rate}{an alternative way to specify the scale.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ dist <- dist_burr(shape1 = c(1,1,1,2,3,0.5), shape2 = c(1,2,3,1,1,2)) diff --git a/man/dist_categorical.Rd b/man/dist_categorical.Rd index 8ee48015..8bc35cb4 100644 --- a/man/dist_categorical.Rd +++ b/man/dist_categorical.Rd @@ -12,15 +12,15 @@ dist_categorical(prob, outcomes = NULL) \item{outcomes}{The values used to represent each outcome.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Categorical distributions are used to represent events with multiple outcomes, such as what number appears on the roll of a dice. This is also referred to as the 'generalised Bernoulli' or 'multinoulli' distribution. The Cateogorical distribution is a special case of the \code{\link[=Multinomial]{Multinomial()}} distribution with \code{n = 1}. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_cauchy.Rd b/man/dist_cauchy.Rd index 2703a509..c3df2399 100644 --- a/man/dist_cauchy.Rd +++ b/man/dist_cauchy.Rd @@ -10,14 +10,14 @@ dist_cauchy(location, scale) \item{location, scale}{location and scale parameters.} } \description{ -\lifecycle{maturing} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + The Cauchy distribution is the student's t distribution with one degree of freedom. The Cauchy distribution does not have a well defined mean or variance. Cauchy distributions often appear as priors in Bayesian contexts due to their heavy tails. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_chisq.Rd b/man/dist_chisq.Rd index 570e2253..f5ee7fdb 100644 --- a/man/dist_chisq.Rd +++ b/man/dist_chisq.Rd @@ -12,13 +12,13 @@ dist_chisq(df, ncp = 0) \item{ncp}{non-centrality parameter (non-negative).} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Chi-square distributions show up often in frequentist settings as the sampling distribution of test statistics, especially in maximum likelihood estimation settings. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_degenerate.Rd b/man/dist_degenerate.Rd index f596a584..a1aeb981 100644 --- a/man/dist_degenerate.Rd +++ b/man/dist_degenerate.Rd @@ -10,13 +10,13 @@ dist_degenerate(x) \item{x}{The value of the distribution.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + The degenerate distribution takes a single value which is certain to be observed. It takes a single parameter, which is the value that is observed by the distribution. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_exponential.Rd b/man/dist_exponential.Rd index 45273b11..dc575591 100644 --- a/man/dist_exponential.Rd +++ b/man/dist_exponential.Rd @@ -10,7 +10,7 @@ dist_exponential(rate) \item{rate}{vector of rates.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ dist <- dist_exponential(rate = c(2, 1, 2/3)) diff --git a/man/dist_f.Rd b/man/dist_f.Rd index 8f7cbbbd..659ab8b9 100644 --- a/man/dist_f.Rd +++ b/man/dist_f.Rd @@ -12,7 +12,7 @@ dist_f(df1, df2, ncp = NULL) \item{ncp}{non-centrality parameter. If omitted the central F is assumed.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \details{ We recommend reading this documentation on diff --git a/man/dist_gamma.Rd b/man/dist_gamma.Rd index fc3fbbcc..abf3f28d 100644 --- a/man/dist_gamma.Rd +++ b/man/dist_gamma.Rd @@ -13,9 +13,8 @@ dist_gamma(shape, rate, scale = 1/rate) \item{rate}{an alternative way to specify the scale.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Several important distributions are special cases of the Gamma distribution. When the shape parameter is \code{1}, the Gamma is an exponential distribution with parameter \eqn{1/\beta}. When the @@ -27,7 +26,8 @@ of the form \eqn{\frac{X_1}{X_1 + X_2}} \eqn{Beta(\alpha_1, \alpha_2)}. This last property frequently appears in another distributions, and it has extensively been used in multivariate methods. More about the Gamma distribution will be added soon. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_geometric.Rd b/man/dist_geometric.Rd index 445303f5..2bc5abe7 100644 --- a/man/dist_geometric.Rd +++ b/man/dist_geometric.Rd @@ -10,12 +10,13 @@ dist_geometric(prob) \item{prob}{probability of success in each trial. \code{0 < prob <= 1}.} } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + The Geometric distribution can be thought of as a generalization of the \code{\link[=dist_bernoulli]{dist_bernoulli()}} distribution where we ask: "if I keep flipping a coin with probability \code{p} of heads, what is the probability I need \eqn{k} flips before I get my first heads?" The Geometric distribution is a special case of Negative Binomial distribution. -\lifecycle{stable} } \details{ We recommend reading this documentation on diff --git a/man/dist_gumbel.Rd b/man/dist_gumbel.Rd index 53c4f230..5ed71542 100644 --- a/man/dist_gumbel.Rd +++ b/man/dist_gumbel.Rd @@ -12,13 +12,13 @@ dist_gumbel(alpha, scale) \item{scale}{parameter. Must be strictly positive.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + The Gumbel distribution is a special case of the Generalized Extreme Value distribution, obtained when the GEV shape parameter \eqn{\xi} is equal to 0. It may be referred to as a type I extreme value distribution. - +} +\details{ We recommend reading this documentation on \url{https://pkg.mitchelloharawild.com/distributional/}, where the math will render nicely. diff --git a/man/dist_hypergeometric.Rd b/man/dist_hypergeometric.Rd index 276fbaf9..8b4eb2a4 100644 --- a/man/dist_hypergeometric.Rd +++ b/man/dist_hypergeometric.Rd @@ -14,16 +14,16 @@ dist_hypergeometric(m, n, k) \item{k}{The size of the sample taken.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + To understand the HyperGeometric distribution, consider a set of \eqn{r} objects, of which \eqn{m} are of the type I and \eqn{n} are of the type II. A sample with size \eqn{k} (\eqn{k lifecyclelifecyclesupersededsuperseded \ No newline at end of file diff --git a/man/generate.distribution.Rd b/man/generate.distribution.Rd index 9fdf7856..b8f7b4c7 100644 --- a/man/generate.distribution.Rd +++ b/man/generate.distribution.Rd @@ -14,8 +14,7 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Generate random samples from probability distributions. } diff --git a/man/geom_hilo_linerange.Rd b/man/geom_hilo_linerange.Rd index 98fab095..139dbd6f 100644 --- a/man/geom_hilo_linerange.Rd +++ b/man/geom_hilo_linerange.Rd @@ -62,9 +62,12 @@ often aesthetics, used to set an aesthetic to a fixed value, like to the paired geom/stat.} } \description{ -\lifecycle{experimental} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} + +This function is deprecated in favour of the ggdist package and will removed +in a future release of this package. Consider using \code{\link[ggdist:stat_slabinterval]{ggdist::stat_slabinterval()}} or +\code{\link[ggdist:geom_slabinterval]{ggdist::geom_slabinterval()}} as an appropriate alternative. + \code{geom_hilo_linerange()} displays the interval defined by a hilo object. The luminance of the shaded area indicates its confidence level. The shade colour can be controlled by the \code{fill} aesthetic, however the luminance will be diff --git a/man/geom_hilo_ribbon.Rd b/man/geom_hilo_ribbon.Rd index 610edcc8..a54a966b 100644 --- a/man/geom_hilo_ribbon.Rd +++ b/man/geom_hilo_ribbon.Rd @@ -62,9 +62,12 @@ often aesthetics, used to set an aesthetic to a fixed value, like to the paired geom/stat.} } \description{ -\lifecycle{maturing} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} + +This function is deprecated in favour of the ggdist package and will removed +in a future release of this package. Consider using \code{\link[ggdist:stat_lineribbon]{ggdist::stat_lineribbon()}} or +\code{\link[ggdist:geom_lineribbon]{ggdist::geom_lineribbon()}} as an appropriate alternative. + \code{geom_hilo_ribbon()} displays the interval defined by a hilo object. The luminance of the shaded area indicates its confidence level. The shade colour can be controlled by the \code{fill} aesthetic, however the luminance will be diff --git a/man/guide_level.Rd b/man/guide_level.Rd index 55a770e8..7180dfe5 100644 --- a/man/guide_level.Rd +++ b/man/guide_level.Rd @@ -12,10 +12,10 @@ If \code{NULL}, the title is not shown. By default (\code{\link[ggplot2:waiver]{waiver()}}), the name of the scale object or the name specified in \code{\link[ggplot2:labs]{labs()}} is used for the title.} -\item{max_discrete}{The maximum number of levels to be shown using \code{\link[ggplot2]{guide_legend}}. -If the number of levels exceeds this value, level shades are shown with \code{\link[ggplot2]{guide_colourbar}}.} +\item{max_discrete}{The maximum number of levels to be shown using \code{\link[ggplot2:guide_legend]{ggplot2::guide_legend()}}. +If the number of levels exceeds this value, level shades are shown with \code{\link[ggplot2:guide_colourbar]{ggplot2::guide_colourbar()}}.} -\item{...}{Further arguments passed onto either \code{\link[ggplot2]{guide_colourbar}} or \code{\link[ggplot2]{guide_legend}}} +\item{...}{Further arguments passed onto either \code{\link[ggplot2:guide_colourbar]{ggplot2::guide_colourbar()}} or \code{\link[ggplot2:guide_legend]{ggplot2::guide_legend()}}} } \description{ The level guide shows the colour from the forecast intervals which is blended with the series colour. diff --git a/man/hdr.distribution.Rd b/man/hdr.distribution.Rd index ceff9ff1..cf634103 100644 --- a/man/hdr.distribution.Rd +++ b/man/hdr.distribution.Rd @@ -16,9 +16,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{experimental} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} + This function is highly experimental and will change in the future. In particular, improved functionality for object classes and visualisation tools will be added in a future release. diff --git a/man/hilo.Rd b/man/hilo.Rd index e954f3a8..a84255a0 100644 --- a/man/hilo.Rd +++ b/man/hilo.Rd @@ -12,10 +12,11 @@ hilo(x, ...) \item{...}{Additional arguments used by methods.} } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Used to extract a specified prediction interval at a particular confidence level from a distribution. -} -\details{ + The numeric lower and upper bounds can be extracted from the interval using \verb{$lower} and \verb{$upper} as shown in the examples below. } diff --git a/man/hilo.distribution.Rd b/man/hilo.distribution.Rd index 2ffc03c9..4ab8342f 100644 --- a/man/hilo.distribution.Rd +++ b/man/hilo.distribution.Rd @@ -14,9 +14,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{maturing} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Returns a \code{hilo} central probability interval with probability coverage of \code{size}. By default, the distribution's \code{\link[=quantile]{quantile()}} will be used to compute the lower and upper bound for a centered interval diff --git a/man/is-distribution.Rd b/man/is-distribution.Rd index 25138286..d6e120cf 100644 --- a/man/is-distribution.Rd +++ b/man/is-distribution.Rd @@ -13,8 +13,9 @@ is_distribution(x) TRUE if the object inherits from the distribution class. } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + This function returns \code{TRUE} for distributions and \code{FALSE} for all other objects. -\lifecycle{stable} } \examples{ dist <- dist_normal() diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd index b1aa4f59..5fca5138 100644 --- a/man/kurtosis.Rd +++ b/man/kurtosis.Rd @@ -15,5 +15,5 @@ kurtosis(x, ...) \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } diff --git a/man/likelihood.Rd b/man/likelihood.Rd index 09ea237e..e4f8cfb1 100644 --- a/man/likelihood.Rd +++ b/man/likelihood.Rd @@ -22,5 +22,5 @@ log_likelihood(x, ...) \item{log}{If \code{TRUE}, the log-likelihood will be computed.} } \description{ -\lifecycle{maturing} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } diff --git a/man/mean.distribution.Rd b/man/mean.distribution.Rd index 7f3bf6f9..adf7db4d 100644 --- a/man/mean.distribution.Rd +++ b/man/mean.distribution.Rd @@ -12,9 +12,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Returns the empirical mean of the probability distribution. If the method does not exist, the mean of a random sample will be returned. } diff --git a/man/median.distribution.Rd b/man/median.distribution.Rd index d85ec45d..3acb18e2 100644 --- a/man/median.distribution.Rd +++ b/man/median.distribution.Rd @@ -14,9 +14,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Returns the median (50th percentile) of a probability distribution. This is equivalent to \code{quantile(x, p=0.5)}. } diff --git a/man/new_dist.Rd b/man/new_dist.Rd index e8a28c46..72973dae 100644 --- a/man/new_dist.Rd +++ b/man/new_dist.Rd @@ -14,5 +14,8 @@ new_dist(..., class = NULL, dimnames = NULL) \item{dimnames}{The names of the variables in the distribution (optional).} } \description{ -Create a new distribution +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} + +Allows extension package developers to define a new distribution class +compatible with the distributional package. } diff --git a/man/new_hilo.Rd b/man/new_hilo.Rd index 1c409bed..63d8eb0f 100644 --- a/man/new_hilo.Rd +++ b/man/new_hilo.Rd @@ -15,7 +15,10 @@ new_hilo(lower = double(), upper = double(), size = double()) A "hilo" vector } \description{ -Construct hilo intervals +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + +Class constructor function to help with manually creating hilo interval +objects. } \examples{ new_hilo(lower = rnorm(10), upper = rnorm(10) + 5, size = 95) diff --git a/man/parameters.Rd b/man/parameters.Rd index 1ca68228..43ab0231 100644 --- a/man/parameters.Rd +++ b/man/parameters.Rd @@ -15,7 +15,7 @@ parameters(x, ...) \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{experimental} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} } \examples{ dist <- c( diff --git a/man/quantile.distribution.Rd b/man/quantile.distribution.Rd index f138ac34..e7b89c90 100644 --- a/man/quantile.distribution.Rd +++ b/man/quantile.distribution.Rd @@ -16,8 +16,7 @@ \item{log}{If \code{TRUE}, probabilities will be given as log probabilities.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Computes the quantiles of a distribution. } diff --git a/man/skewness.Rd b/man/skewness.Rd index 602480d2..6f5f6be9 100644 --- a/man/skewness.Rd +++ b/man/skewness.Rd @@ -15,5 +15,5 @@ skewness(x, ...) \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } diff --git a/man/support.Rd b/man/support.Rd index a78b1b4a..97b8c68b 100644 --- a/man/support.Rd +++ b/man/support.Rd @@ -15,5 +15,5 @@ support(x, ...) \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{experimental} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} } diff --git a/man/variance.Rd b/man/variance.Rd index d23a1e6f..c5484a32 100644 --- a/man/variance.Rd +++ b/man/variance.Rd @@ -21,6 +21,8 @@ variance(x, ...) \item{...}{Additional arguments used by methods.} } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + A generic function for computing the variance of an object. } \details{ diff --git a/man/variance.distribution.Rd b/man/variance.distribution.Rd index 621aa807..2af968bb 100644 --- a/man/variance.distribution.Rd +++ b/man/variance.distribution.Rd @@ -12,9 +12,8 @@ \item{...}{Additional arguments used by methods.} } \description{ -\lifecycle{stable} -} -\details{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} + Returns the empirical variance of the probability distribution. If the method does not exist, the variance of a random sample will be returned. }