{"id":32178583,"url":"https://github.com/xrobin/proc","last_synced_at":"2025-10-21T20:58:09.833Z","repository":{"id":1652117,"uuid":"2377999","full_name":"xrobin/pROC","owner":"xrobin","description":"Display and analyze ROC curves in R","archived":false,"fork":false,"pushed_at":"2025-07-31T15:40:32.000Z","size":2465,"stargazers_count":128,"open_issues_count":16,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-21T20:58:08.211Z","etag":null,"topics":["bootstrapping","covariance","cran","hypothesis-testing","machine-learning","plot","plotting","r","r-package","roc","roc-curve","variance"],"latest_commit_sha":null,"homepage":"https://xrobin.github.io/pROC/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xrobin.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2011-09-13T12:09:08.000Z","updated_at":"2025-09-29T17:09:50.000Z","dependencies_parsed_at":"2023-07-11T18:33:01.412Z","dependency_job_id":"733964df-56c5-473c-9785-69260cb8c9b7","html_url":"https://github.com/xrobin/pROC","commit_stats":{"total_commits":955,"total_committers":13,"mean_commits":73.46153846153847,"dds":0.04293193717277488,"last_synced_commit":"435109419a29f538afa766e5fd113afd8958c722"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/xrobin/pROC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrobin%2FpROC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrobin%2FpROC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrobin%2FpROC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrobin%2FpROC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xrobin","download_url":"https://codeload.github.com/xrobin/pROC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrobin%2FpROC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333502,"owners_count":26312845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrapping","covariance","cran","hypothesis-testing","machine-learning","plot","plotting","r","r-package","roc","roc-curve","variance"],"created_at":"2025-10-21T20:58:06.495Z","updated_at":"2025-10-21T20:58:09.827Z","avatar_url":"https://github.com/xrobin.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![R build status](https://github.com/xrobin/pROC/workflows/R-CMD-check/badge.svg)](https://github.com/xrobin/pROC/actions?workflow=R-CMD-check)\n[![R build status](https://github.com/xrobin/pROC/workflows/test-coverage/badge.svg)](https://github.com/xrobin/pROC/actions?workflow=test-coverage)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/xrobin/pROC?branch=master\u0026svg=true)](https://ci.appveyor.com/project/xrobin/pROC)\n[![Codecov coverage](https://codecov.io/github/xrobin/pROC/branch/master/graphs/badge.svg)](https://app.codecov.io/github/xrobin/pROC) \n[![CRAN Version](http://www.r-pkg.org/badges/version/pROC)](https://cran.r-project.org/package=pROC)\n[![Downloads](http://cranlogs.r-pkg.org/badges/pROC)](https://cran.r-project.org/package=pROC)\n\npROC\n=============\n\nAn [R](https://www.r-project.org/) package to display and analyze ROC curves.\n\nFor more information, see:\n\n1. Xavier Robin, Natacha Turck, Alexandre Hainard, *et al.* (2011) “pROC: an open-source package for R and S+ to analyze and compare ROC curves”. *BMC Bioinformatics*, **7**, 77. DOI: [10.1186/1471-2105-12-77](http://dx.doi.org/10.1186/1471-2105-12-77)\n2. [The official web page](https://xrobin.github.io/pROC/)\n3. [The CRAN page](https://cran.r-project.org/package=pROC)\n4. [My blog](http://xavier.robin.name/tag/pROC/)\n5. [The FAQ](https://github.com/xrobin/pROC/wiki/FAQ---Frequently-asked-questions)\n\nStable\n-------\n\nThe latest stable version is best installed from the CRAN:\n\n    install.packages(\"pROC\")\n\nGetting started\n-------\n\nIf you don't want to read the manual first, try the following:\n\n### Loading \n\n```R\nlibrary(pROC)\ndata(aSAH)\n```\n### Basic ROC / AUC analysis \n```R\nroc(aSAH$outcome, aSAH$s100b)\nroc(outcome ~ s100b, aSAH)\n```\n### Smoothing\n```R\nroc(outcome ~ s100b, aSAH, smooth=TRUE) \n```\n### more options, CI and plotting\n```R\nroc1 \u003c- roc(aSAH$outcome,\n            aSAH$s100b, percent=TRUE,\n            # arguments for auc\n            partial.auc=c(100, 90), partial.auc.correct=TRUE,\n            partial.auc.focus=\"sens\",\n            # arguments for ci\n            ci=TRUE, boot.n=100, ci.alpha=0.9, stratified=FALSE,\n            # arguments for plot\n            plot=TRUE, auc.polygon=TRUE, max.auc.polygon=TRUE, grid=TRUE,\n            print.auc=TRUE, show.thres=TRUE)\n\n    # Add to an existing plot. Beware of 'percent' specification!\n    roc2 \u003c- roc(aSAH$outcome, aSAH$wfns,\n            plot=TRUE, add=TRUE, percent=roc1$percent)        \n```\n### Coordinates of the curve\n```R\ncoords(roc1, \"best\", ret=c(\"threshold\", \"specificity\", \"1-npv\"))\ncoords(roc2, \"local maximas\", ret=c(\"threshold\", \"sens\", \"spec\", \"ppv\", \"npv\"))\n```\n### Confidence intervals\n```R\n# Of the AUC\nci(roc2)\n\n# Of the curve\nsens.ci \u003c- ci.se(roc1, specificities=seq(0, 100, 5))\nplot(sens.ci, type=\"shape\", col=\"lightblue\")\nplot(sens.ci, type=\"bars\")\n\n# need to re-add roc2 over the shape\nplot(roc2, add=TRUE)\n\n# CI of thresholds\nplot(ci.thresholds(roc2))\n```\n### Comparisons\n```R\n    # Test on the whole AUC\n    roc.test(roc1, roc2, reuse.auc=FALSE)\n\n    # Test on a portion of the whole AUC\n    roc.test(roc1, roc2, reuse.auc=FALSE, partial.auc=c(100, 90),\n             partial.auc.focus=\"se\", partial.auc.correct=TRUE)\n\n    # With modified bootstrap parameters\n    roc.test(roc1, roc2, reuse.auc=FALSE, partial.auc=c(100, 90),\n             partial.auc.correct=TRUE, boot.n=1000, boot.stratified=FALSE)\n```\n### Sample size\n```R\n    # Two ROC curves\n    power.roc.test(roc1, roc2, reuse.auc=FALSE)\n    power.roc.test(roc1, roc2, power=0.9, reuse.auc=FALSE)\n\n    # One ROC curve\n    power.roc.test(auc=0.8, ncases=41, ncontrols=72)\n    power.roc.test(auc=0.8, power=0.9)\n    power.roc.test(auc=0.8, ncases=41, ncontrols=72, sig.level=0.01)\n    power.roc.test(ncases=41, ncontrols=72, power=0.9)\n```\n\n\nGetting Help\n------------\n\n* Type `?pROC` on the R command line\n* Make sure you've [read the FAQ](https://github.com/xrobin/pROC/wiki/FAQ---Frequently-asked-questions)\n* Search for [questions tagged with pROC-R-package on Stack Overflow](https://stackoverflow.com/questions/tagged/proc-r-package?tab=Votes)\n\nIf you still can't find an answer, you can:\n\n* [Ask a question on Stack Overflow with the pROC-r-package tag](https://stackoverflow.com/questions/ask?tags=pROC-r-package)\n* [Bug reports should be submitted to the GitHub issue tracker](https://github.com/xrobin/pROC/issues)\n\n\n\nDevelopment\n-------\n\n### Installing the development version\n\nDownload the source code from git, unzip it if necessary, and then type `R CMD INSTALL pROC`. Alternatively, you can use the [devtools](https://github.com/r-lib/devtools/wiki) package by [Hadley Wickham](https://hadley.nz) to automate the process (make sure you follow [the full instructions to get started](https://devtools.r-lib.org/)):\n\n```R\nif (! requireNamespace(\"devtools\")) install.packages(\"devtools\")\ndevtools::install_github(\"xrobin/pROC@develop\")\n```\n\n### Check\n\nTo run all automated tests and R checks, including slow tests:\n\n```\ncd .. # Run from parent directory\nVERSION=$(grep Version pROC/DESCRIPTION | sed \"s/.\\+ //\")\nR CMD build pROC\nRUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz\n```\n\nOr from an R command prompt with devtools:\n\n```\ndevtools::check()\n```\n\n### Tests\n\nTo run automated tests only from an R command prompt:\n\n```\nrun_slow_tests \u003c- TRUE  # Optional, include slow tests\ndevtools::test()\n```\n\n### vdiffr\n\nThe [vdiffr](https://github.com/r-lib/vdiffr) package is used for visual tests of plots.\n\nTo run all the test cases (incl. slow ones) from the command line:\n\n```R\nrun_slow_tests \u003c- TRUE\ndevtools::test() # Must run the new tests\ntestthat::snapshot_review()\n```\n\nTo run the checks upon R CMD check, set environment variable `NOT_CRAN=1`:\n\n```\nNOT_CRAN=1 RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz\n```\n\n### AppVeyor Build Cache\n\nBy default, AppVeyor stores a build cache containing installed dependencies.\nSometimes you want to clean the cache, for instance if a\n`Graphics API versionmismatch` occurs on R-devel, indicating that `ggplot2` was\nbuilt with a previous version of R. For this you need the AppVeyor \n[API key](https://ci.appveyor.com/api-keys) to make a `DELETE` request:\n\n```R\nexport APPVEYOR_TOKEN=\"\u003cyour-api-token\u003e\"\ncurl -H \"Authorization: Bearer $APPVEYOR_TOKEN\" -H \"Content-Type: application/json\" -X DELETE https://ci.appveyor.com/api/projects/xrobin/pROC/buildcache\n```\n\n### Release steps\n\n1. Update `Version` and `Date` in `DESCRIPTION`\n1. Update version and date in `NEWS`\n1. Get new version to release: `VERSION=$(grep Version pROC/DESCRIPTION | sed \"s/.\\+ //\") \u0026\u0026 echo $VERSION`\n1. Build \u0026 check package: `R CMD build pROC \u0026\u0026 R CMD check --as-cran pROC_$VERSION.tar.gz`\n1. Check with slow tests: `NOT_CRAN=1  RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz`\n1. Check with R-devel: `rhub::check_for_cran()`\n1. Check reverse dependencies: `revdepcheck::revdep_check(num_workers=8, timeout = as.difftime(60, units = \"mins\"))`\n1. Merge into master: `git checkout master \u0026\u0026 git merge develop`\n1. Create a tag on master: `git tag v$VERSION \u0026\u0026 git push --tags`\n1. [Submit to CRAN](https://cran.r-project.org/submit.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrobin%2Fproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxrobin%2Fproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrobin%2Fproc/lists"}