data(fourpeaks)
d <- fourpeaks()
ms <- msc.nn(y=d[,1], x=d[, 2:3], knn=10, pLevelP = 0.1)
#compute the indices belonging to partition Id 2 at Morse-Smale persistence
ind <- msc.level.ind(ms$level[[1]], 2)
ms <- msc.nn(y=d[,1], x=d[, 2:3], knn=10, nLevels=10)
#compute the indices belonging to partition Id 2 at Morse-Smale persistence level 3
ind <- msc.level.ind(ms$level[[3]], 2)
Run the code above in your browser using DataLab