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

  • dd9e837
  • /
  • test
  • /
  • test_gini.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:3c8bf2cc3bc662fa5a961e1b1f7f3324c90badf6
directory badge
swh:1:dir:3d4e1d33669c97accb580cef4ff3f05a314d2417

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 ...
test_gini.R

if (FALSE){
  library(ggplot2)
  n <- 100 
  set.seed(10)
  y <- abs(rnorm(n))
  P <- abs(rnorm(n))
  S <- abs(cbind(rnorm(n), rnorm(n), rnorm(n), rnorm(n), rnorm(n)))
  dimnames(S)[[2]] <- c("a", "b", "c", "d", "e")
  
  data = as.data.frame(cbind(y, P, S))
  loss <- "y"
  score <- c("a", "b", "c")
  base = c("P", "c")
  
  
  x1 <- gini(loss = "y", score = c("a", "b", "c", "d", "e"), base = "P", data = data)
  x1
  plot(x1)
  plot(x1, overlay = FALSE)
  
  
  x3 <- gini(loss = "y", score = c("b", "c", "d", "e"), base = NULL, data = data)                 
  x3
  plot(x3)
  plot(x3, overlay = FALSE)
  
  plot(x)                 
  plot(x, overlay = FALSE)
  
  x = ans
  digits = 3
  plot(x)
}

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