File: rnormmix.R

package info (click to toggle)
r-cran-mixtools 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,828 kB
  • ctags: 20
  • sloc: ansic: 733; makefile: 6
file content (9 lines) | stat: -rwxr-xr-x 326 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
# 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))
}