I have the attached point list and use the following script to cluster the points. The clustering should just be applied to the first three-member of each sublist so I removed the fourth element from each sublist. However, after clustering the fourth member should be added to the associated sublist. How I can do that. https://pastebin.com/SKvFEEQD
A11 = Drop[dataDCMp, None, {4}];
nng = NearestNeighborGraph[A11, 4];
ccmp = ConnectedComponents[nng];
NearestNeighborGraph[dataDCMp, 4, DistanceFunction -> (EuclideanDistance[#1[[;; 3]], #2[[;; 3]]] &)], which may take a while to finish. – FJRA Jul 09 '20 at 02:16Extract[dataDCMp, List /@ ConnectedComponents[IndexGraph@nng]]gives what you need? – kglr Jul 09 '20 at 12:23