Skip to content

Commit

Permalink
updated design vignette for proportion_* functions formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Dec 15, 2023
1 parent b4264e0 commit 04e6a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/design-principles.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The distribution functions return a vector of `numeric`s of equal length to the

## Design decisions

- `proportion_*()` functions return a `<data.frame>` with the proportion column(s) containing `character` strings, formatted with a percentage sign (`%`). It was reasoned that {superspreading} is most likely used either as a stand-alone package, or at the terminus of a epidemiological analysis pipeline, and thus the outputs of {superspreading} functions would not be passed into other functions. If this were the case then the proportions would be better as `numeric`.
- `proportion_*()` functions return a `<data.frame>` with the proportion column(s) containing `character` strings, formatted with a percentage sign (`%`) by default. It was reasoned that {superspreading} is most likely used either as a stand-alone package, or at the terminus of a epidemiological analysis pipeline, and thus the outputs of {superspreading} functions would not be passed into other functions. For instances where these proportions need to be passed to another calculation or for plotting purposes the `format_prop` argument can be switched to `FALSE` and a `numeric` column of proportions will be returned.

- The distribution functions are vectorised (i.e. wrapped in `Vectorize()`). This enables them to be used identically to base R distribution functions.

Expand Down

0 comments on commit 04e6a33

Please sign in to comment.