Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type: Package
Package: distspec
Title: Define Probability Distributions with Certain or Uncertain Parameters
Title: Probability Distributions with Certain or Uncertain Parameters
Version: 0.1.0
Authors@R:
c(person(given = "Sebastian",
Expand Down
19 changes: 2 additions & 17 deletions R/dist_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ max.multi_dist_spec <- function(x, ...) {
#' print(dist2)
print.dist_spec <- function(x, ...) {
print_dist_spec_indented(x, indent = 0, ...)
invisible(x)
}
#' @keywords internal
print_dist_spec_indented <- function(x, indent, ...) {
Expand Down Expand Up @@ -553,7 +554,7 @@ print_dist_spec_indented <- function(x, indent, ...) {
#' @importFrom rlang .data `%||%`
#' @importFrom cli cli_abort cli_warn
#' @export
#' @examples
#' @examplesIf rlang::is_installed("ggplot2")
#' # A fixed lognormal distribution with mean 5 and sd 1.
#' dist1 <- LogNormal(mean = 1.6, sd = 0.5, max = 20)
#' # Plot discretised distribution with 1 day discretisation window
Expand Down Expand Up @@ -672,22 +673,6 @@ plot.dist_spec <- function(x, samples = 50L, res = 1, cumulative = TRUE, ...) {
#' @importFrom cli cli_abort
#' @return A single `dist_spec` object
#' @keywords internal
#' @examples
#' dist1 <- LogNormal(mean = 1.6, sd = 0.5, max = 20)
#'
#' # An uncertain gamma distribution with shape and rate normally distributed
#' # as Normal(3, 0.5) and Normal(2, 0.5) respectively
#' dist2 <- Gamma(
#' shape = Normal(3, 0.5),
#' rate = Normal(2, 0.5),
#' max = 20
#' )
#'
#' # Multiple distributions
#' \dontrun{
#' dist <- dist1 + dist2
#' extract_single_dist(dist, 2)
#' }
extract_single_dist <- function(x, i) {
if (i > ndist(x)) {
cli_abort(
Expand Down
7 changes: 7 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
CMD
CensoredDistributions
Charniga
Codecov
ComposedDistributions
Dirichlet
Discretisation
Discretise
Discretised
Discretising
EpiNow
Lifecycle
ORCID
PMF
PMFs
Un
cleanups
cutoff
dependabot
discretisation
discretise
discretised
discretises
dist
erroring
etc
github
jamesmbaazam
jl
medRxiv
nonzero
pmf
Expand All @@ -29,3 +35,4 @@ roxygen
sbfnk
sd
seabbs
th
2 changes: 1 addition & 1 deletion man/distspec-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions man/extract_single_dist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/plot.dist_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.