Skip to content
Back to formatted view

Raw Message

Message-ID: <1319735648317-3945243.post@n4.nabble.com>
Date: 2011-10-27T17:14:08Z
From: 1Rnwb
Subject: help with parallel processing code
In-Reply-To: <1319719847569-3944303.post@n4.nabble.com>

my modification gives me error
>  rows<- c(1:nrow(mat))
>  scores <- c()
>  labels <-c()
>  itr<-1000
>  chnksz<-ceiling(itr/getDoParWorkers())
> smpopt=list(chunkSize=chnksz)
>  foreach(icount(itr),.combine=cbind,.options.smp=smpopts)%dopar%
+  {
+  train <- sample(rows, length(rows)-1)
+  label =0 ; if (mat$Self_T1D[-train] == "N") label = 1  #need the value
for this line, should it be 'N' or 'Y'
+  z <- lda(mat[train,4] ~ mat[train,1:3])
+  score = predict(z, mat[-train, ])$pos[1]
+  scores <- c(scores, score)
+  labels<- c(labels, label)
+  }
Error in { : task 1 failed - "could not find function "lda""

--
View this message in context: http://r.789695.n4.nabble.com/help-with-parallel-processing-code-tp3944303p3945243.html
Sent from the R help mailing list archive at Nabble.com.