I am using a rock clustering algorithm to cluster on 40 different subsets of a data set with 60,000 points. Below is my macro, for some reason I keep getting a run-time error. I am new to R, was wondering if anyone had any ideas...
The function works by finding the clusters for each subset, and stacking the results into a matrix called M. library(cba) d<-read.csv("data.csv", header=TRUE) d<-as.matrix(d) v<-c(53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 21 72 73 74 75 76 77 78) clusterMe<-function(d,v){ tempMat<-subset(d,d[,v[1]]=="TRUE") rc<-rockCluster(tempMat,n=5,theta=.2) tempMat<-cbind(tempMat,rc$cl) M<-tempMat for (i in 2:26){ tempMat<-subset(d,d[,v[i]]=="TRUE") rc<-rockCluster(tempMat,n=5,theta=.2) tempMat<-cbind(tempMat,rc$cl) M<-rbind(M,tempMat) } M } clusters<-function(d,v) -- View this message in context: http://www.nabble.com/Run-time-Error--Function-Help-tp20396768p20396768.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.