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/sns
11 November 2022, 14:07:59 UTC
  • Code
  • Branches (8)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/0.9
    • refs/tags/0.9.1
    • refs/tags/1.0.0
    • refs/tags/1.1.0
    • refs/tags/1.1.1
    • refs/tags/1.1.2
    • refs/tags/1.2.2
    No releases to show
  • b713208
  • /
  • R
  • /
  • sns.methods.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:d438b6ad62d20afe0c1bc76f5d15ade651d6f886
origin badgedirectory badge Iframe embedding
swh:1:dir:3875d822efb39da9b7d5d63d0271338089c510c8
origin badgerevision badge
swh:1:rev:9829a5182483d64b64779c302eea58781cc356b0
origin badgesnapshot badge
swh:1:snp:218ce733af7de6247148caa3cf8c71ef1c66e614
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: 9829a5182483d64b64779c302eea58781cc356b0 authored by Asad Hasan on 25 August 2014, 00:00:00 UTC
version 0.9
Tip revision: 9829a51
sns.methods.R
######################################
#                                    #
#  Methods for sns objects           #
#                                    #
######################################

# print method 
print.sns <- function(x, ...)
{
  cat(paste0("Acceptance rate % = ", x$acceptance, "\n"))
  eff.samp <- round(ess(x$samplesMat)) 
  cat(paste0("Effective (independent) samples from ", nrow(x$samplesMat)),
      " draws:\n\tmin    - ", min(eff.samp), "\n\tmedian - ", median(eff.samp),
      "\n\tmax    - ", max(eff.samp), "\n")
}

# summary method 
summary.sns <- function(object, show.means = FALSE, ...)
{
  cat("-----------------------\n")
  cat("MCMC sampling using SNS\n")
  cat("-----------------------\n")
  print(object)
  cat(paste0("No. of burn-in iterations = ", object$burn.iters),"\nTimings:\n")
  cat(paste0("\tburn-in : ", round(object$burnin.time, 1), " sec\n"))
  cat(paste0("\tsampling: ", round(object$sample.time, 1), " sec\n"))
  if (show.means) {
    cat("\n")
    stats <- cbind(colMeans(object$samplesMat), 
                   apply(object$samplesMat, 2, sd))
    colnames(stats) <- c("sample mean", "std dev")
    rownames(stats) <- c(1:ncol(object$samplesMat))
    printCoefmat(stats)
  }
  cat("-----------------------\n")
}

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

back to top