Skip to content

Commit df891c4

Browse files
authored
Merge pull request #42 from schuettl/patch-1
Tiny fixes in Vignette code
2 parents 503b810 + a548353 commit df891c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vignettes/getting-started.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ cl <- makeSlurmCluster(100)
4848

4949
# Computing the mean of a 100 random uniforms within each worker
5050
# for this we can use any of the function available in the parallel package.
51-
ans <- parSapply(1:200, function(x) mean(runif(100)))
51+
ans <- parSapply(cl, 1:200, function(x) mean(runif(100)))
5252

5353
# We simply call stopCluster as we would do with any other cluster
5454
# object
55-
stopCluster(ans)
55+
stopCluster(cl)
5656
```
5757

5858
## Job arrays using the *apply family

0 commit comments

Comments
 (0)