R/rnormmix.R

Defines functions normmix.sim

Documented in normmix.sim

# Simulate from a normal mixture.  New version simply calls rmvnormmix.

# normmix.sim is here for backwards compatibility
rnormmix <- normmix.sim <- function(n,lambda=1,mu=0,sigma=1) {
  if (NCOL(mu)>1 || NCOL(sigma)>1)
    stop ("Use the rmvnormmix function instead.")
  as.vector(rmvnormmix(n,lambda,mu,sigma))
}

Try the mixtools package in your browser

Any scripts or data that you put into this service are public.

mixtools documentation built on Dec. 5, 2022, 5:23 p.m.