Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/doParallel
23 February 2022, 09:29:41 UTC
  • Code
  • Branches (23)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.0.0
    • refs/tags/1.0.1
    • refs/tags/1.0.10
    • refs/tags/1.0.11
    • refs/tags/1.0.14
    • refs/tags/1.0.15
    • refs/tags/1.0.16
    • refs/tags/1.0.17
    • refs/tags/1.0.3
    • refs/tags/1.0.6
    • refs/tags/1.0.7
    • refs/tags/1.0.8
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • 8adc0b6
  • /
  • inst
  • /
  • doc
  • /
  • gettingstartedParallel.R
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:ce8153abbf69701c087ab5fa4ceb4e2a42815eb2
origin badgedirectory badge Iframe embedding
swh:1:dir:1f67ca0339cafa4e17b622ca5390afc4109f249d
origin badgerevision badge
swh:1:rev:e3aa58ec1baa966a2ffa7a12156112e0de571d09
origin badgesnapshot badge
swh:1:snp:9e237295e4cb0cb01a3f5c368216b67a29736c74
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: e3aa58ec1baa966a2ffa7a12156112e0de571d09 authored by Michelle Wallig on 16 October 2020, 05:20:10 UTC
version 1.0.16
Tip revision: e3aa58e
gettingstartedParallel.R
### R code from vignette source 'gettingstartedParallel.Rnw'

###################################################
### code chunk number 1: loadLibs
###################################################
library(doParallel)
cl <- makeCluster(2)
registerDoParallel(cl)
foreach(i=1:3) %dopar% sqrt(i)


###################################################
### code chunk number 2: gettingstartedParallel.Rnw:149-150
###################################################
stopCluster(cl)


###################################################
### code chunk number 3: gettingstartedParallel.Rnw:193-196
###################################################
library(doParallel)
cl <- makeCluster(2)
registerDoParallel(cl)


###################################################
### code chunk number 4: bootpar
###################################################
x <- iris[which(iris[,5] != "setosa"), c(1,5)]
trials <- 10000

ptime <- system.time({
  r <- foreach(icount(trials), .combine=cbind) %dopar% {
    ind <- sample(100, 100, replace=TRUE)
    result1 <- glm(x[ind,2]~x[ind,1], family=binomial(logit))
    coefficients(result1)
  }
})[3]
ptime


###################################################
### code chunk number 5: bootseq
###################################################
stime <- system.time({
  r <- foreach(icount(trials), .combine=cbind) %do% {
    ind <- sample(100, 100, replace=TRUE)
    result1 <- glm(x[ind,2]~x[ind,1], family=binomial(logit))
    coefficients(result1)
  }
})[3]
stime


###################################################
### code chunk number 6: getDoParWorkers
###################################################
getDoParWorkers()


###################################################
### code chunk number 7: getDoParName
###################################################
getDoParName()
getDoParVersion()


###################################################
### code chunk number 8: gettingstartedParallel.Rnw:274-275
###################################################
stopCluster(cl)


back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API