# NOT RUN {
# Load phoneme data
library(fds);
# Setup data to be clustered
dat = rbind( t(aa$y[,1:20]),t(iy$y[,1:20]),t(sh$y[,1:20]) );
# Cluster data into three groups
clst = cluster.com(dat,grpCnt=3);
matrix(clst,3,20,byrow=TRUE);
# cluster groups of curves
dat = rbind( t(aa$y[,1:40]),t(iy$y[,1:40]),t(sh$y[,1:40]) );
lab = gl(30,4);
# Cluster data into three groups
clst = cluster.com(dat,labl=lab,grpCnt=3);
matrix(clst,3,10,byrow=TRUE);
# }
Run the code above in your browser using DataLab