distrSimulate: Simulate from a Distribution

View source: R/distrSimulate.R

distrSimulateR Documentation

Simulate from a Distribution

Description

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

Usage

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 March 28, 2022, 1:05 a.m.