m1 <- rnorm(3)
m2 <- rnorm(3) + 0.5
x <- rbind( rvmf(100, m1, 3), rvmf(80, m2, 5) )
ina <- c( rep(1,100), rep(2, 80) )
xnew <- rbind(rvmf(10, m1, 10), rvmf(10, m2, 5))
id <- rep(1:2, each = 10)
g <- dirda(xnew, x, ina, type = "vmf")
table(id, g[, 1])
Run the code above in your browser using DataLab