Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 11 committers (9.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Display and analyze ROC curves in R
Basic Info
- Host: GitHub
- Owner: xrobin
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://xrobin.github.io/pROC/
- Size: 2.35 MB
Statistics
- Stars: 127
- Watchers: 7
- Forks: 31
- Open Issues: 16
- Releases: 0
Topics
Metadata Files
README.md
pROC
An R package to display and analyze ROC curves.
For more information, see:
- 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
- The official web page
- The CRAN page
- My blog
- The FAQ
Stable
The latest stable version is best installed from the CRAN:
install.packages("pROC")
Getting started
If you don't want to read the manual first, try the following:
Loading
R
library(pROC)
data(aSAH)
Basic ROC / AUC analysis
R
roc(aSAH$outcome, aSAH$s100b)
roc(outcome ~ s100b, aSAH)
Smoothing
R
roc(outcome ~ s100b, aSAH, smooth=TRUE)
more options, CI and plotting
```R roc1 <- roc(aSAH$outcome, aSAH$s100b, percent=TRUE, # arguments for auc partial.auc=c(100, 90), partial.auc.correct=TRUE, partial.auc.focus="sens", # arguments for ci ci=TRUE, boot.n=100, ci.alpha=0.9, stratified=FALSE, # arguments for plot plot=TRUE, auc.polygon=TRUE, max.auc.polygon=TRUE, grid=TRUE, print.auc=TRUE, show.thres=TRUE)
# Add to an existing plot. Beware of 'percent' specification!
roc2 <- roc(aSAH$outcome, aSAH$wfns,
plot=TRUE, add=TRUE, percent=roc1$percent)
```
Coordinates of the curve
R
coords(roc1, "best", ret=c("threshold", "specificity", "1-npv"))
coords(roc2, "local maximas", ret=c("threshold", "sens", "spec", "ppv", "npv"))
Confidence intervals
```R
Of the AUC
ci(roc2)
Of the curve
sens.ci <- ci.se(roc1, specificities=seq(0, 100, 5)) plot(sens.ci, type="shape", col="lightblue") plot(sens.ci, type="bars")
need to re-add roc2 over the shape
plot(roc2, add=TRUE)
CI of thresholds
plot(ci.thresholds(roc2)) ```
Comparisons
```R # Test on the whole AUC roc.test(roc1, roc2, reuse.auc=FALSE)
# Test on a portion of the whole AUC
roc.test(roc1, roc2, reuse.auc=FALSE, partial.auc=c(100, 90),
partial.auc.focus="se", partial.auc.correct=TRUE)
# With modified bootstrap parameters
roc.test(roc1, roc2, reuse.auc=FALSE, partial.auc=c(100, 90),
partial.auc.correct=TRUE, boot.n=1000, boot.stratified=FALSE)
```
Sample size
```R # Two ROC curves power.roc.test(roc1, roc2, reuse.auc=FALSE) power.roc.test(roc1, roc2, power=0.9, reuse.auc=FALSE)
# One ROC curve
power.roc.test(auc=0.8, ncases=41, ncontrols=72)
power.roc.test(auc=0.8, power=0.9)
power.roc.test(auc=0.8, ncases=41, ncontrols=72, sig.level=0.01)
power.roc.test(ncases=41, ncontrols=72, power=0.9)
```
Getting Help
- Type
?pROCon the R command line - Make sure you've read the FAQ
- Search for questions tagged with pROC-R-package on Stack Overflow
If you still can't find an answer, you can:
- Ask a question on Stack Overflow with the pROC-r-package tag
- Bug reports should be submitted to the GitHub issue tracker
Development
Installing the development version
Download the source code from git, unzip it if necessary, and then type R CMD INSTALL pROC. Alternatively, you can use the devtools package by Hadley Wickham to automate the process (make sure you follow the full instructions to get started):
R
if (! requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("xrobin/pROC@develop")
Check
To run all automated tests and R checks, including slow tests:
cd .. # Run from parent directory
VERSION=$(grep Version pROC/DESCRIPTION | sed "s/.\+ //")
R CMD build pROC
RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz
Or from an R command prompt with devtools:
devtools::check()
Tests
To run automated tests only from an R command prompt:
run_slow_tests <- TRUE # Optional, include slow tests
devtools::test()
vdiffr
The vdiffr package is used for visual tests of plots.
To run all the test cases (incl. slow ones) from the command line:
R
run_slow_tests <- TRUE
devtools::test() # Must run the new tests
testthat::snapshot_review()
To run the checks upon R CMD check, set environment variable NOT_CRAN=1:
NOT_CRAN=1 RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz
AppVeyor Build Cache
By default, AppVeyor stores a build cache containing installed dependencies.
Sometimes you want to clean the cache, for instance if a
Graphics API versionmismatch occurs on R-devel, indicating that ggplot2 was
built with a previous version of R. For this you need the AppVeyor
API key to make a DELETE request:
R
export APPVEYOR_TOKEN="<your-api-token>"
curl -H "Authorization: Bearer $APPVEYOR_TOKEN" -H "Content-Type: application/json" -X DELETE https://ci.appveyor.com/api/projects/xrobin/pROC/buildcache
Release steps
- Update
VersionandDateinDESCRIPTION - Update version and date in
NEWS - Get new version to release:
VERSION=$(grep Version pROC/DESCRIPTION | sed "s/.\+ //") && echo $VERSION - Build & check package:
R CMD build pROC && R CMD check --as-cran pROC_$VERSION.tar.gz - Check with slow tests:
NOT_CRAN=1 RUN_SLOW_TESTS=true R CMD check pROC_$VERSION.tar.gz - Check with R-devel:
rhub::check_for_cran() - Check reverse dependencies:
revdepcheck::revdep_check(num_workers=8, timeout = as.difftime(60, units = "mins")) - Merge into master:
git checkout master && git merge develop - Create a tag on master:
git tag v$VERSION && git push --tags - Submit to CRAN
Owner
- Name: Xavier Robin
- Login: xrobin
- Kind: user
- Location: Basel, Switzerland
- Company: Swiss Institute of Bioinformatics / University of Basel
- Website: https://xavier.robin.name/
- Twitter: xavier_robin
- Repositories: 5
- Profile: https://github.com/xrobin
GitHub Events
Total
- Issues event: 5
- Watch event: 6
- Delete event: 1
- Issue comment event: 22
- Push event: 27
- Pull request event: 10
- Create event: 2
Last Year
- Issues event: 5
- Watch event: 6
- Delete event: 1
- Issue comment event: 22
- Push event: 27
- Pull request event: 10
- Create event: 2
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Xavier Robin | x****b@x****e | 934 |
| Zane Billings | 3****s | 16 |
| Michael Chirico | c****m@g****m | 6 |
| Matthias Doering | m****g@m****e | 5 |
| Stefan Siegert | s****t@g****e | 2 |
| Xavier | x****r@u****) | 2 |
| Shyam Saladi | s****i | 1 |
| Mkranj | m****6@g****m | 1 |
| Kirill Sevastyanenko | k****a@g****m | 1 |
| Dmytro S Lituiev | d****v@g****m | 1 |
| Clemens Messerschmidt | m****c | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 97
- Total pull requests: 15
- Average time to close issues: about 2 months
- Average time to close pull requests: 19 days
- Total issue authors: 57
- Total pull request authors: 6
- Average comments per issue: 2.22
- Average comments per pull request: 3.33
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 8
- Average time to close issues: about 1 month
- Average time to close pull requests: 17 days
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 1.5
- Average comments per pull request: 1.5
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- xrobin (34)
- MichaelChirico (4)
- jarauh (2)
- topepo (2)
- AngCamp (2)
- yurasmol (2)
- greynes (1)
- DavisVaughan (1)
- oharari (1)
- 814471489 (1)
- benneely (1)
- DylanGuo1101 (1)
- coslovskym (1)
- yuliaUU (1)
- kingcrimsontianyu (1)
Pull Request Authors
- MichaelChirico (13)
- DSLituiev (1)
- Mkranj (1)
- messersc (1)
- wzbillings (1)
- matdoering (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- cran 132,368 last-month
- Total docker downloads: 33,773,741
-
Total dependent packages: 153
(may contain duplicates) -
Total dependent repositories: 597
(may contain duplicates) - Total versions: 96
- Total maintainers: 1
cran.r-project.org: pROC
Display and Analyze ROC Curves
- Homepage: https://xrobin.github.io/pROC/
- Documentation: http://cran.r-project.org/web/packages/pROC/pROC.pdf
- License: GPL (≥ 3)
-
Latest release: 1.18.5
published over 2 years ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/xrobin/proc
- Documentation: https://pkg.go.dev/github.com/xrobin/proc#section-documentation
- License: gpl-3.0
-
Latest release: v1.19.0
published 7 months ago
Rankings
proxy.golang.org: github.com/xrobin/pROC
- Documentation: https://pkg.go.dev/github.com/xrobin/pROC#section-documentation
- License: gpl-3.0
-
Latest release: v1.19.0
published 7 months ago
Rankings
conda-forge.org: r-proc
- Homepage: http://expasy.org/tools/pROC/
- License: GPL-3.0-or-later
-
Latest release: 1.18.0
published over 4 years ago
Rankings
Dependencies
- R >= 2.14 depends
- Rcpp >= 0.11.1 imports
- methods * imports
- plyr * imports
- MASS * suggests
- doParallel * suggests
- ggplot2 * suggests
- logcondens * suggests
- microbenchmark * suggests
- tcltk * suggests
- testthat * suggests
- vdiffr * suggests
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite