View source: R/13-01-defineFunctions.R
addStochList | R Documentation |
Add stochastic noise to a list variable.
addStochList(x, stoch)
x |
A list of numeric vectors. |
stoch |
A numeric vector of length 1. |
This function was created to multiply multiple elements of a list by a stochastic variable that was drawn from a random number generator. But, more generally it is just list multiplication with a different name.
The element-wise product of x and stoch.
# x <- list(
# runif(10, 1, 10),
# runif(10, 10, 20)
# )
#
# addStochList(x, runif(1, 0, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.