Description Usage Arguments Value Examples
Generates temporally autocorrelated random numbers with a mean, standard deviation, and autocorrelation you specify.
1 | colored_noise(timesteps, mean, sd, phi)
|
timesteps |
The number of temporally autocorrelated random numbers (one per timestep) you want. |
mean |
The mean of the temporally autocorrelated random numbers. |
sd |
The standard deviation of the temporally autocorrelated random numbers. |
phi |
The temporal autocorrelation. 0 is white noise (uncorrelated), positive values are red noise (directly correlated) and negative values are blue noise (inversely correlated). |
A vector of temporally autocorrelated random numbers.
1 2 | rednoise <- colored_noise(timesteps = 30, mean = 0.5, sd = 0.2, phi = 0.3)
rednoise
|
[1] 0.4362254 0.3397425 0.3171747 0.4835210 0.5082803 0.4769603 0.4267399
[8] 0.2772355 0.5433090 0.6202901 0.5163448 0.9160473 0.7219747 0.6442659
[15] 0.1806139 0.3969893 0.8037635 0.5922267 0.4024535 0.1527872 0.3343558
[22] 0.4876815 0.3396315 0.4523542 0.6308637 0.7800687 0.4849510 0.3849085
[29] 0.6653942 1.0557551
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.