random.sample: Radon sample of n elements

Description Usage Arguments Value Note Author(s) Examples

View source: R/ode_functs.R

Description

create a random sample of n elements for a normal distribution determined by the mean, sd, lower and upper bounds.

Usage

1
random.sample(n, mean, sd, lowerBound, upperBound)

Arguments

n

Number of elements to calculate

mean

Mean of the distribution

sd

Standard deviation of the distribution

lowerBound

minimum value of the distribution

upperBound

maximum value of the distribution

Value

na vector containing n values with the mean and sd of the given distribution and bounded by the upper and lower bounds given

Note

Distribution is assumed to be normal Useful when need to generate data for simulations following the descriptors of a given population.

Author(s)

Not me...

Examples

1
2
3
4
#considering a length distribution of the observed population 
#determined by a mean of 5, and sd 0.5, and with a minimum 
#value of 3 and maximum of 6.5
L = random.sample(20,5,0.5,3,6.5)

Echinophoria/DEB_output documentation built on Nov. 19, 2019, 10:46 p.m.