I have a problem with using the variable "Druckfaktor" in parLapply
.
My code looks like this:
Druckfaktor <- 1.3
no_cores <- detectCores()-1
cl <- makeCluster(no_cores)
S <- parLapply(cl,m.list,function(x) {
s <- diag(x[2:4])
s[1,2] <- s[2,1] <- x[5]
s[2,3] <- s[3,2] <- x[6]
s[3,1] <- s[1,3] <- x[7]
VD <- eigen(s)
V <- VD$vectors
D <- VD$values
D[D<0] <- D[D<0]/Druckfaktor
s <- V %*% diag(D) %*% t(V)
c(x[1],s[1,1],s[2,2],s[3,3],s[1,2],s[2,3],s[3,1])
})
stopCluster(cl)code here
Unfortunately the function answers with:
Error in checkForRemoteErrors(val) : 11 nodes produced errors; first error: Objekt 'Druckfaktor' nicht gefunden
How can I use this "Druckfaktor" together with parLapply
?
Thanks