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

  • 5796d8b
  • /
  • demo
  • /
  • searchList.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
content badge
swh:1:cnt:6a0086bce0b28d9da55ef3dfc72247957c5f7c03
directory badge
swh:1:dir:6780b0a5c69b61818b82508a1a2f211b3ab09319

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
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
searchList.R
e1 = new.env()
assign("f", function(x)"f1", envir = e1)
e3 = new.env()
assign("g", function(x)f(x), envir = e3)
attach(e1)
attach(e3)
## Our intention is that g() calls f() in e1
g(1) #OK
## But now a new version of f() appears
e2 = new.env()
assign("f", function(x)"f2", envir = e2)
attach(e2)
search()
g(1)
## Because of search list position, the wrong function was called
## Furthermore, even having f() in the same environment as g() doesn't help:
assign("f", function(x)"f3", envir = e3)
objects(3)
detach(3)
attach(e3, pos=3)
g(1)
## And the same danger exists if the call to f() is from within the environment
assign("h", function(x)g(x), envir = e3)
detach(3)
attach(e3, pos=3)
h(1)

back to top

Software Heritage — Copyright (C) 2015–2026, 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