{
  "_id": "6acdf063a14063b82c3ad47d",
  "Package": "CooccurrenceAffinity",
  "Type": "Package",
  "Title": "Affinity in Co-Occurrence Data",
  "Version": "2.0.0",
  "Date": "2026-01-27",
  "Authors@R": "c(\nperson(\"Kumar\", \"Mainali\", role = c(\"aut\", \"cre\"), email = \"kpmainali@gmail.com\"),\nperson(\"Eric\", \"Slud\", role = c(\"aut\"))\n)",
  "Description": "Computes a novel metric of affinity between two entities\nbased on their co-occurrence (using binary presence/absence\ndata). The metric and its maximum likelihood estimator (alpha\nhat) were advanced in Mainali, Slud, et al, 2021\n<doi:10.1126/sciadv.abj9204>. Four types of confidence\nintervals and median interval were developed in Mainali and\nSlud, 2022 <doi:10.1101/2022.11.01.514801>. The `finches`\ndataset is bundled with the package.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "URL": "https://github.com/kpmainali/CooccurrenceAffinity",
  "BugReports": "https://github.com/kpmainali/CooccurrenceAffinity/issues",
  "RoxygenNote": "7.3.1",
  "Repository": "https://kpmainali.r-universe.dev",
  "Date/Publication": "2026-01-28 23:51:40 UTC",
  "RemoteUrl": "https://github.com/kpmainali/cooccurrenceaffinity",
  "RemoteRef": "HEAD",
  "RemoteSha": "9bb0d218071ce4096039a3fc7d537f9210a27208",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-13 08:38:09 UTC",
    "User": "root"
  },
  "Author": "Kumar Mainali [aut, cre],\nEric Slud [aut]",
  "Maintainer": "Kumar Mainali <kpmainali@gmail.com>",
  "_user": "kpmainali",
  "_type": "src",
  "_file": "CooccurrenceAffinity_2.0.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/f7089147816cc3d30f519028c4fb4c0b9c68f005e3ad7cc975c080603118b634",
  "_filesize": 1123533,
  "_sha256": "f7089147816cc3d30f519028c4fb4c0b9c68f005e3ad7cc975c080603118b634",
  "_expires": "2027-01-21T08:48:33.000Z",
  "_created": "2026-10-13T08:38:09.000Z",
  "_published": "2026-10-13T08:48:35.352Z",
  "_buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 115206450987,
      "time": 112,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11798298807"
    },
    {
      "job": 115206450969,
      "time": 115,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11798956768"
    },
    {
      "job": 115206450812,
      "time": 159,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11800125230"
    },
    {
      "job": 115206450816,
      "time": 173,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11798334951"
    },
    {
      "job": 115205453335,
      "time": 153,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11798554220"
    },
    {
      "job": 115206451176,
      "time": 85,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11798479525"
    },
    {
      "job": 115206450957,
      "time": 97,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11798169060"
    },
    {
      "job": 115206450984,
      "time": 66,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11799011459"
    },
    {
      "job": 115206450882,
      "time": 82,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11798388628"
    }
  ],
  "_upstream": "https://github.com/kpmainali/cooccurrenceaffinity",
  "_commit": {
    "id": "9bb0d218071ce4096039a3fc7d537f9210a27208",
    "author": "kpmainali <kpmainali@gmail.com>",
    "committer": "kpmainali <kpmainali@gmail.com>",
    "message": "Release 2.0.0 (CRAN-ready)\n",
    "time": 1769644300
  },
  "_maintainer": {
    "name": "Kumar Mainali",
    "email": "kpmainali@gmail.com",
    "login": "kpmainali",
    "linkedin": "in/kumar-mainali-7594357a",
    "description": "I work mostly on ecological and earth science systems, and apply machine learning, AI, plus a suite of statistical models, and mathematical statistics.",
    "uuid": 14167540
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1",
      "role": "Depends"
    },
    {
      "package": "BiasedUrn",
      "version": ">= 2.0.9",
      "role": "Depends"
    },
    {
      "package": "cowplot",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "plyr",
      "role": "Imports"
    },
    {
      "package": "reshape",
      "role": "Imports"
    }
  ],
  "_owner": "kpmainali",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-05",
      "n": 13
    }
  ],
  "_tags": [],
  "_stars": 29,
  "_contributors": [
    {
      "user": "kpmainali",
      "count": 179,
      "uuid": 14167540
    }
  ],
  "_userbio": {
    "uuid": 14167540,
    "type": "user",
    "name": "Kumar Mainali",
    "followers": 3,
    "description": "I work mostly on ecological and earth science systems, and apply machine learning, AI, plus a suite of statistical models, and mathematical statistics."
  },
  "_downloads": {
    "count": 339,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/CooccurrenceAffinity"
  },
  "_devurl": "https://github.com/kpmainali/cooccurrenceaffinity",
  "_searchresults": 25,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/CooccurrenceAffinity.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/kpmainali/cooccurrenceaffinity",
  "_realowner": "kpmainali",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0",
      "date": "2023-05-03"
    },
    {
      "version": "1.0.2",
      "date": "2025-06-27"
    },
    {
      "version": "2.0.0",
      "date": "2026-02-16"
    }
  ],
  "_exports": [
    "AcceptAffCI",
    "AcceptAffin",
    "affinity",
    "affinity2by2",
    "AlphInts",
    "Bisect",
    "Covrg",
    "CovrgPlot",
    "dataprep",
    "EHypMidP",
    "EHypQuInt",
    "logLikExtHyp",
    "MaxX.Int",
    "midP.EHyp",
    "minmaxAlpha.pFNCH",
    "MinX.Int",
    "ML.Alpha",
    "plotgg"
  ],
  "_datasets": [
    {
      "name": "finches",
      "title": "Darwin’s finches presence–absence data",
      "object": "finches",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Seymour",
        "Baltra",
        "Isabella",
        "Fernandina",
        "Santiago",
        "Rabida",
        "Pinzon",
        "Santa.Cruz",
        "Santa.Fe",
        "San.Cristobal",
        "Espanola",
        "Floreana",
        "Genovesa",
        "Marchena",
        "Pinta",
        "Darwin",
        "Wolf"
      ],
      "rows": 13,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "AcceptAffCI",
      "title": "Acceptability Interval",
      "topics": [
        "AcceptAffCI"
      ]
    },
    {
      "page": "AcceptAffin",
      "title": "Calculates the \"Acceptability Function\" used in defining Blaker's (2000) Acceptability Interval and computing the latter in the function AcceptAffCI().",
      "topics": [
        "AcceptAffin"
      ]
    },
    {
      "page": "affinity",
      "title": "Computes alpha, probability, expected co-occurence, median interval, various confidence intervals, other indices of affinity, etc.",
      "topics": [
        "affinity"
      ]
    },
    {
      "page": "affinity2by2",
      "title": "Maximum likelihood estimate and intervals of alpha, null expectation, p-value and traditional indices from a 2x2 table",
      "topics": [
        "affinity2by2"
      ]
    },
    {
      "page": "AlphInts",
      "title": "Median interval, four confidence intervals, null expectation of cooccurrence count, and p-value",
      "topics": [
        "AlphInts"
      ]
    },
    {
      "page": "Bisect",
      "title": "Bisections for finding a root of a function",
      "topics": [
        "Bisect"
      ]
    },
    {
      "page": "Covrg",
      "title": "Coverage Probabilities for Confidence Intervals about alpha, for fixed true alpha",
      "topics": [
        "Covrg"
      ]
    },
    {
      "page": "dataprep",
      "title": "Occurrence matrix (e.g., species by site) data preparation for affinity() function",
      "topics": [
        "dataprep"
      ]
    },
    {
      "page": "EHypMidP",
      "title": "Quantile of the Extended Hypergeometric distribution approximated by the midP distribution function",
      "topics": [
        "EHypMidP"
      ]
    },
    {
      "page": "EHypQuInt",
      "title": "Interval of alpha values for which X is a specified q'th quantile",
      "topics": [
        "EHypQuInt"
      ]
    },
    {
      "page": "finches",
      "title": "Darwin’s finches presence–absence data",
      "topics": [
        "finches"
      ]
    },
    {
      "page": "logLikExtHyp",
      "title": "log of Extended Hypergeometric Likelihiood at (X, mA,mB,N, alpha)",
      "topics": [
        "logLikExtHyp"
      ]
    },
    {
      "page": "MaxX.Int",
      "title": "MaxX.Int computation",
      "topics": [
        "MaxX.Int"
      ]
    },
    {
      "page": "midP.EHyp",
      "title": "midP.EHyp computation",
      "topics": [
        "midP.EHyp"
      ]
    },
    {
      "page": "minmaxAlpha.pFNCH",
      "title": "integer-endpoint of range for which BiasedUrn::pFNCHHypergeo() works without error",
      "topics": [
        "minmaxAlpha.pFNCH"
      ]
    },
    {
      "page": "MinX.Int",
      "title": "MinX.Int computation",
      "topics": [
        "MinX.Int"
      ]
    },
    {
      "page": "ML.Alpha",
      "title": "Maximum likelihood estimate and intervals of alpha, null expectation and p-value of a 2x2 table",
      "topics": [
        "ML.Alpha"
      ]
    },
    {
      "page": "plotgg",
      "title": "Heatmap plot of affinity() output",
      "topics": [
        "plotgg"
      ]
    }
  ],
  "_readme": "https://github.com/kpmainali/cooccurrenceaffinity/raw/HEAD/README.md",
  "_rundeps": [
    "BiasedUrn",
    "cli",
    "cowplot",
    "cpp11",
    "farver",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "plyr",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "reshape",
    "rlang",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_score": 4.559308010907013,
  "_indexed": true,
  "_nocasepkg": "cooccurrenceaffinity",
  "_universes": [
    "kpmainali"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:51.000Z",
      "distro": "resolute",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/23482c4669190e4fc8f5856393d5087485d8ca9bdbba347fccf15dd721ed75d6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:52.000Z",
      "distro": "resolute",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/79e1c022273dabc9b5efbe5a48292f69f681290a0374dc231507463b48437ed9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.0",
      "date": "2026-10-13T08:47:31.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/3a64d9ee38d167f13cee87fa41fb7a690c226b3cd2a5feb79641027d86cb00fc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "2.0.0",
      "date": "2026-10-13T08:46:09.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/a633fb858e7c3b9587fad1756c758b6a43d57b56b92b8fe43e1b176ea4f97fad",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:48.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/528e888f146d3a9cf797fba102949cff342f8ca4413cbd2c0f47a0d233525bd8",
      "status": "success",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:25.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/ae17884440916265c8ea951fa21693421caaa9b7f92f8a0827a455b24f5d80a4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:06.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/fb2b7c177ee8994c0445d4b4ac67d6cb15c7e9d5a1adc5a0b6e0f85398f9a9e5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-10-13T08:39:14.000Z",
      "commit": "9bb0d218071ce4096039a3fc7d537f9210a27208",
      "fileid": "https://r2.ropensci.org/2f64aa3c5bc41464f5a6cc81065414442e6b90052308e6f5e63f6d90c4c1caf0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kpmainali/actions/runs/38370294436"
    }
  ]
}