distrSimulate: Simulate from a Distribution

Description Usage Arguments Value

View source: R/distrSimulate.R

Description

Helper function to quickly simulate from a distribution with given parameters.

Usage

1
2
3
4
5
6
7
8
distrSimulate(
  n = 100,
  distribution = "Normal",
  pars = list(),
  simplify = TRUE,
  seed,
  ...
)

Arguments

n

number of points to simulate.

distribution

distribution to simulate from, corresponds to ClassName of distr6 distribution, abbreviations allowed.

pars

parameters to pass to distribution. If omitted then distribution defaults used.

simplify

if TRUE (default) only the simulations are returned, otherwise the constructed distribution is also returned.

seed

passed to set.seed

...

additional optional arguments for set.seed

Value

If simplify then vector of n simulations, otherwise list of simulations and distribution.


distr6 documentation built on Sept. 6, 2021, 9:10 a.m.