Function factory to apply white noise to a vector

white_noise(sd = 0.1)

Arguments

sd

the standard deviation of noise to apply.

Value

a function

Examples


f <- white_noise(1)
f(1:10)
#>  [1] -0.6634049  2.1775340  3.3599222  4.1695389  4.6349767  4.9422650
#>  [7]  7.6751151  8.4927681  9.3044962  9.7424608