# \donttest{
data(medfly25)
Flies <- MakeFPCAInputs(medfly25$ID, medfly25$Days, medfly25$nEggs)
newClust <- FClust(Flies$Ly, Flies$Lt, k = 2, optnsFPCA =
list(methodMuCovEst = 'smooth', userBwCov = 2, FVEthreshold = 0.90))
# We denote as 'veryLowCount' the group of flies that lay less
# than twenty-five eggs during the 25-day period examined.
veryLowCount = ifelse( sapply( unique(medfly25$ID), function(u)
sum( medfly25$nEggs[medfly25$ID == u] )) < 25, 0, 1)
N <- length(unique(medfly25$ID))
(correctRate <- sum( (1 + veryLowCount) == newClust$cluster) / N) # 99.6%
# }
Run the code above in your browser using DataLab