SunWuKung - 1 year ago 94

R Question

I would like to draw a sample from a normal distribution such that its mean is eg. 1.

How could I do this in R?

(I saw many examples with discrete distributions but not for continuous.)

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

Answer Source

To get 1000 samples

```
samples <- rnorm(1000, mean=1, sd=1)
```

After some clarification, that the sample should be skewed normal

```
library(sn)
rsn(n=1000, xi=0, omega=1, alpha=0, tau=0, dp=NULL)
```

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