https://github.com/bblodfon/usefun
Various useful R functions
https://github.com/bblodfon/usefun
functions r r-package
Last synced: 12 months ago
JSON representation
Various useful R functions
- Host: GitHub
- URL: https://github.com/bblodfon/usefun
- Owner: bblodfon
- License: other
- Created: 2019-06-11T09:31:32.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T23:30:02.000Z (almost 2 years ago)
- Last Synced: 2025-06-26T03:05:27.061Z (about 1 year ago)
- Topics: functions, r, r-package
- Language: R
- Homepage:
- Size: 171 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
# usefun
[](https://github.com/bblodfon/usefun/actions)
[](https://app.codecov.io/gh/bblodfon/usefun)
[](https://cran.r-project.org/package=usefun)
[](https://cran.r-project.org/package=usefun)
A set of miscellaneous functions that I have used in various projects and in other R packages.
Some of the most important are:
- `powerset_icounts()`: find common (patient) ids in incomplete multi-omic datasets
- `get_roc_stats()`: the ROC statistics the way you want it!
- `pr.test()`: compare two PR curves (AUCs) and get a p-value!
- `pr.boot()`: bootstrap CIs for PR curve
- `partial_permut()`: get a partially-scrambled vector (you choose how much!)
- `normalize_to_range()`: normalize a vector to a specified range
- `dec_to_bin()`: convert a decimal (base-10) number to its binary representation
- `get_percentage_of_matches()`: find the percentage of common elements between two vectors
- `outersect()`: find the non-common elements between two vectors (outer-section!)
- `colors.100`: a vector of 100 as much as possible *distinct* colors
## Install
CRAN version:
```
install.packages("usefun")
```
Development version:
```
devtools::install_github("bblodfon/usefun")
```
## Examples
See examples in the functions documentation and in the respective tests.
For a full biomarker analysis that uses various functions from this package, see [this report](https://druglogics.github.io/gitsbe-model-analysis/atopo/cell-lines-2500/).