Welcome to the R package usefr

This is an utility package where some useful functions frequently needed in the dowstream statistical analyses will be available.


This application is under development. Watch this repo or check for updates.


This package depends, so far, from: BiocParallel, minpack.lm, numDeriv, copula. There are also other dependencies which are included in R by default, e.g., start

Install R dependencies:

    if (!requireNamespace("BiocManager")) install.packages("BiocManager")

    BiocManager::install(c("BiocParallel","minpack.lm", "numDeriv", "copula", 
                            "mclust", "nls2", "cubature", "mixdist"), 

Installing issues with the R package "cubature" on CentOS

The installation of "cubature" R package on CenOS (required by 'usefr') from the source, would produce some error when trying to compile the C++ code from the package source.

"/lib64/ version `GLIBCXX_3.4.20' not found (required by ..."


"./src/divonne/Split.c:119:3: note: use option -std=c99 or -std=gnu99 to compile your code"

In the above situations, just proceed with the following steps (

  1. In your home directory search for the folder named ".R" (a hidden folder) and a file named "Makevars", i.e.: "~/.R/Makevars".

If you do not have the folder ".R", then creates it. If you do not have the file "Makevars", then you can create an empty text file

  1. Adds the following line to the the file "Makevars":


    if your file is empty, then you can add, e.g., something like this:

    ``` SOLARIS=$(shell $(R_HOME)/bin/Rscript -e 'cat(grepl("SunOS",["sysname"]))') ifeq ($(SOLARIS),TRUE) SOLARIS_FLAG=-DSOLARIS else SOLARIS_FLAG=-USOLARIS endif



If the above step does not works then, follow the link:

You can install usefr package from GitHub


Or download the binary of 'usefr' R package from here: and in the R console type:

                 repos = NULL, type = "source")

usefr R Package Manual:

usefr PDF manual

usefr browser manual

Some examples of applications:

Sampling from a Mixture of Distributions

Fitting Mixture Distributions

genomaths/usefr documentation built on July 28, 2022, 12:31 p.m.