This is a sample code for longitudinal clustering project "Cluster Analysis of Longitudinal Profiles with Subgroups".
The sample code is built under software R (https://www.r-project.org). Please have the following packages installed in your machine. install.packages("plyr");
install.packages(fda);#bspline basis
install.packages(Matrix);
install.packages(matrixcalc);
install.packages(igraph);
install.packages(Rcpp);
install.packages(RcppArmadillo);
We provide a sample data set in sampledata.txt. Please run sample.R to test the clustering algorithm.