sample_distributions: Sample from Standard Distributions

Description Usage Arguments Value Examples

View source: R/sample_distributions.R

Description

Supply a list of defined distributions (log-normal, beta, gamma, uniform, triangle) and one realisation is taken of each.

Usage

1
sample_distributions(param.distns)

Arguments

param.distns

List of distribution names and their respective parameter values

Value

vector of sample points

Examples

1
2
3
4
5
6
sample_distributions(param.distns = list(distn = "unif", params = c(min=0, max=1)))
sample_distributions(param.distns = list(distn = "lognormal", params = c(mean=10, sd=1)))
sample_distributions(param.distns = list(distn = "beta", params = c(mean=0.1, sd=0.1)))
sample_distributions(param.distns = list(distn = "beta", params = c(a=0.1, b=0.1)))
sample_distributions(param.distns = list(list(distn = "beta", params = c(a=0.1, b=0.1)),
                                         list(distn = "beta", params = c(a=0.1, b=0.1))))

n8thangreen/treeSimR documentation built on Feb. 20, 2022, 11:54 a.m.