# NOT RUN {
## generate data of 3 types with clear difference
dt1 = aux.gensamples(n=33)-100
dt2 = aux.gensamples(n=33)
dt3 = aux.gensamples(n=33)+100
## merge the data and create a label correspondingly
Y = rbind(dt1,dt2,dt3)
label = c(rep(1,33), rep(2,33), rep(3,33))
## perform onto 2-dimensional space
output = do.lda(Y, label, ndim=2)
## visualize
opar <- par(no.readonly=TRUE)
plot(output$Y, main="3 groups on 2d plane")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab