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

swh:1:snp:6a0ac420dcf26f4ce7b9c8b5d3c5816f5620bd13
  • Code
  • Branches (20)
  • Releases (0)
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/1.2.2
    • refs/tags/1.3.1
    • refs/tags/1.3.2
    • refs/tags/1.3.4
    • refs/tags/1.4.0
    • refs/tags/1.4.1
    • refs/tags/1.4.2
    • refs/tags/1.4.4
    • refs/tags/1.4.5
    • refs/tags/1.5.0
    • refs/tags/1.5.1
    • refs/tags/1.5.2
    • refs/tags/1.5.5
    • refs/tags/1.5.6
    • refs/tags/1.5.7
    • refs/tags/1.5.8
    • refs/tags/1.5.9
    • refs/tags/1.6.1
    • refs/tags/1.6.2
    No releases to show
  • 85738a1
  • /
  • R
  • /
  • vuniroot.R
Raw File Download

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
content badge
swh:1:cnt:49e42393a288a2e5cc34d6eef4200703374713b3
directory badge
swh:1:dir:2afcc20b668138eef8cec1a48b19b2df900e0c75
revision badge
swh:1:rev:c12a9847539968aa375d4df8349a3a524e7c1bb5
snapshot badge
swh:1:snp:6a0ac420dcf26f4ce7b9c8b5d3c5816f5620bd13

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: c12a9847539968aa375d4df8349a3a524e7c1bb5 authored by Mark Clements on 17 January 2019, 14:50:04 UTC
version 1.4.5
Tip revision: c12a984
vuniroot.R
vuniroot <- 
function (f, ..., lower, upper, 
    f.lower = f(lower, ...), f.upper = f(upper, ...), check.conv = FALSE, tol = .Machine$double.eps^0.25, 
    maxiter = 1000, trace = 0) 
{
    stopifnot(all(is.numeric(lower), is.numeric(upper), is.numeric(f.lower), is.numeric(f.upper)))
    stopifnot(all.equal(length(lower), length(upper), length(f.lower), length(f.upper)))
    stopifnot(!any(is.na(lower)))
    stopifnot(!any(is.na(upper)))
    stopifnot(!any(is.na(f.lower)))
    stopifnot(!any(is.na(f.upper)))
    ## re-order lower and upper if lower>upper - too automagical?
    if (any(index <- (lower>upper))) {
        temp <- lower[index]
        lower[index] <- upper[index]
        upper[index] <- temp
        temp <- f.lower[index]
        f.lower[index] <- f.upper[index]
        f.upper[index] <- temp
    }
    maxiter <- as.integer(maxiter)
    fun <- function(x) f(x, ...)
    if (check.conv) {
        val <- tryCatch(.Call("vunirootRcpp", fun, lower, upper, maxiter, tol, PACKAGE="rstpm2"), 
            warning = function(w) w)
        if (inherits(val, "warning")) 
            stop("convergence problem in zero finding: ", conditionMessage(val))
    }
    else {
        val <- .Call("vunirootRcpp", fun, lower, upper, maxiter, tol, PACKAGE="rstpm2")
    }
    iter <- as.integer(val[[2L]])
    if (any(iter < 0)) {
        (if (check.conv) 
            stop
        else warning)(sprintf(ngettext(maxiter, "_NOT_ converged in %d iteration", 
            "_NOT_ converged in %d iterations"), maxiter), domain = NA)
        iter <- maxiter
    }
    list(root = val[[1L]], f.root = f(val[[1L]], ...), iter = iter) 
        #init.it = it), estim.prec = val[[3L]])
}

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— Content policy— Contact— JavaScript license information— Web API