R: Difference between revisions

Jump to navigation Jump to search
50 bytes removed ,  4 years ago
m
retrait d'éléments superflus pour la compréhension
(Marked this version for translation)
m (retrait d'éléments superflus pour la compréhension)
Line 387: Line 387:
x <- iris[which(iris[,5] != "setosa"), c(1,5)]
x <- iris[which(iris[,5] != "setosa"), c(1,5)]
trials <- 10000
trials <- 10000
ptime <- system.time({
 
    foreach(icount(trials), .combine=cbind) %dopar%
foreach(icount(trials), .combine=cbind) %dopar%
     {
     {
        ind <- sample(100, 100, replace=TRUE)
    ind <- sample(100, 100, replace=TRUE)
        result1 <- glm(x[ind,2]~x[ind,1], family=binomial(logit))
    result1 <- glm(x[ind,2]~x[ind,1], family=binomial(logit))
        coefficients(result1)
    coefficients(result1)
     }
     }
})
ptime[3]


<!--T:61-->
<!--T:61-->
cc_staff
56

edits

Navigation menu