RDJ - 1 year ago 264

R Question

I want to create two different vectors of data which are normal distributions. One which has a a mean value of 0 and variance of 1; one which has a mean value of 0 and variance of 0.25.

Can this be done with

`rnorm`

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

Of course. Type `?rnorm`

into the console to learn more about it. I'm assuming you want vectors with 100 numbers, but just change `n`

if you want.

```
vector1 = rnorm(n = 100, mean = 0, sd = sqrt(1))
vector2 = rnorm(n = 100, mean = 0, sd = sqrt(0.25))
```

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**