A Collection of Useful Functions by John

A set of general functions that I have used in various projects and other R packages. Miscellaneous operations on data frames, matrices and vectors, ROC and PR statistics.


usefun

R build status codecov CRAN status Downloads

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("usefun")

0.5.2 by John Zobolas, 2 years ago


https://github.com/bblodfon/usefun


Report a bug at https://github.com/bblodfon/usefun/issues


Browse source code at https://github.com/cran/usefun


Authors: John Zobolas [aut, cph, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports checkmate, dplyr, graphics, precrec, PRROC, stats, tibble, utils

Suggests combinat, covr, ggplot2, mlr3misc, readr, testthat


See at CRAN