SunWuKung SunWuKung - 1 year ago 86
R Question

generating skewed normal distribution in R

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.)

Answer Source

To get 1000 samples

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

After some clarification, that the sample should be skewed normal

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