run_variable: Generate Random Distribution

Description Usage Arguments Value Examples

View source: R/runapp.R

Description

Generate Random Distribution

Usage

1
2
run_variable(n, mean, sd, method = "RND", lhs = NULL, distro = "normal",
  lower = -Inf, upper = Inf, seed = 1234)

Arguments

n

number of realizations

mean

mean

sd

standard deviation

method

sampling method, either "RND" or "LHS". Default = "RND"

lhs

vector of quatiles (obtained from LH sampling functions). Not required is method = "RND". Default = NULL

distro

distribution

lower

lower limit of the truncated distribution

upper

upper limit of the truncated distribution

seed

integer serving as seed number

Value

an array with n random values for the given parameters

Examples

1
2
3
4
5
6
7
8
## Not run: 
distribution_1 <- run_variable(100, 10, 4)
hist(distribution_1)

distribution_2 <- run_variable(100, 10, 4, "truncated normal", 7, 13, seed = 123)
hist(distribution_2)

## End(Not run)

ravenroadresources/Flamingo documentation built on May 5, 2019, 1:38 p.m.