# A Collection of Efficient and Extremely Fast R Functions

## Documentation for package ‘Rfast’ version 2.1.0

- DESCRIPTION file.
- Package NEWS.

## Help Pages

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z misc

Rfast-package | A Collection of Efficient and Extremely Fast R Functions

## -- A --

acg.mle | MLE of (hyper-)spherical distributions
AddToNamespace | Insert/remove function names in/from the NAMESPACE file
allbetas | Simple linear regressions coefficients
allttests | Matrix with all pairs of t-tests
all_equals | Equality of objects
ancova1 | Analysis of covariance
ancovas | Many ANCOVAs
anova1 | Multi-sample tests for vectors
anovas | Many multi-sample tests
anova_propreg | Significance testing for the coefficients of Quasi binomial or the quasi Poisson regression
anova_qpois.reg | Significance testing for the coefficients of Quasi binomial or the quasi Poisson regression
anova_quasipois.reg | ANOVA for two quasi Poisson regression models
apply.condition | Apply to each column a method under condition
ar1 | Estimation of an AR(1) model
as.Rfast.function | Convert R function to the Rfast's coresponding
as_integer | Check if values are integers and convert to integer
auc | Many area under the curve values

## -- B --

bc | Estimation of the Box-Cox transformation
bcdcor | Distance correlation
beta.mle | MLE of distributions defined in the (0, 1) interval
betabinom.mle | MLE of count data
betageom.mle | MLE of count data
betaprime.mle | MLE of continuous univariate distributions defined on the positive line
bic.corfsreg | BIC (using partial correlation) forward regression
bic.fs.reg | BIC forward regression with generalised linear models
binary_search | Binary search algorithm
bincomb | Permutation
binom.mle | MLE of count data
block.anova | Multi-sample tests for vectors
block.anovas | Many multi-sample tests
boot.ttest2 | Bootstrap t-test for 2 independent samples
borel.mle | MLE of count data
bs.reg | Backward selection regression
btmprobs | Fitted probabilities of the Terry-Bradley model

## -- C --

cat.goftests | Many one sample goodness of fit tests for categorical data
cauchy.mle | MLE of continuous univariate distributions defined on the real line
checkAliases | Check Namespace and Rd files
checkExamples | Check Namespace and Rd files
checkNamespace | Check Namespace and Rd files
checkTF | Check Namespace and Rd files
checkUsage | Check Namespace and Rd files
check_data | Search for variables with zero range in a matrix
chi2Test | G-square test of conditional indepdence
chi2tests | Many G-square tests of indepedence
chi2Test_univariate | Matrix with G-square tests of indepdence
chisq.mle | MLE of continuous univariate distributions defined on the positive line
cholesky | Cholesky decomposition of a square matrix
Choose | Binomial coefficient and its logarithm
circlin.cor | Circular-linear correlation
coeff | Coefficient matrices.
col.coxpoisrat | Cox confidence interval for the ratio of two Poisson variables
col.yule | Column-wise Yule's Y (coefficient of colligation)
colAll | Column and row-wise Any
colanovas | Many Welch's F-tests
colAny | Column and row-wise Any
colar1 | Estimation of an AR(1) model
colaucs | Many area under the curve values
colCountValues | Row - Wise matrix/vector count the frequency of a value
colCumMaxs | Colum-wise cumulative operations (sum, prod, min, max)
colCumMins | Colum-wise cumulative operations (sum, prod, min, max)
colCumProds | Colum-wise cumulative operations (sum, prod, min, max)
colCumSums | Colum-wise cumulative operations (sum, prod, min, max)
colcvs | Column and row wise coefficients of variation
coldiffs | Column-wise differences
colexp2.mle | Column-wise MLE of some univariate distributions
colexpmle | Column-wise MLE of some univariate distributions
colFalse | Column-wise true/false value of a matrix
colgammamle | Column-wise MLE of some univariate distributions
colgeom.mle | MLE for multivariate discrete data
colhameans | Column and row-wise means of a matrix
colinvgauss.mle | Column-wise MLE of some univariate distributions
colkurtosis | Column-wise kurtosis and skewness coefficients
collaplace.mle | Column-wise MLE of some univariate distributions
collindley.mle | Column-wise MLE of some univariate distributions
colMads | Column and row-wise mean absolute deviations
colmaxboltz.mle | Column-wise MLE of some univariate distributions
colMaxs | Column-wise minimum and maximum of a matrix
colmeans | Column and row-wise means of a matrix
colmeans.data.frame | Column and row-wise means of a matrix
colmeans.matrix | Column and row-wise means of a matrix
colMedians | Column and row-wise medians of a matrix or median of a vector.
colMins | Column-wise minimum and maximum of a matrix
colMinsMaxs | Column-wise minimum and maximum of a matrix
colnormal.mle | Column-wise MLE of some univariate distributions
colnormlog.mle | Column-wise MLE of some univariate distributions
colnth | Column and row-wise nth smallest value of a matrix/vector
colOrder | Column and row-wise Order - Sort Indices
colpareto.mle | Column-wise MLE of some univariate distributions
colPmax | Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices
colPmin | Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices
colpois.tests | Many tests for the dispersion parameter in Poisson distribution
colpoisdisp.tests | Many tests for the dispersion parameter in Poisson distribution
colpoisson.anovas | Many ANOVAS for count data with Poisson or quasi Poisson models
colpoisson.mle | MLE for multivariate discrete data
colprods | Column and row-wise products
colquasipoisson.anovas | Many ANOVAS for count data with Poisson or quasi Poisson models
colrange | Column and row-wise range of values of a matrix.
colRanks | Column and row-wise ranks
colrayleigh.mle | Column-wise MLE of some univariate distributions
colrint.regbx | Many random intercepts LMMs for balanced data with a single identical covariate
colrow.value | Check if any column or row is fill with values
colShuffle | Column and row-wise Shuffle
colskewness | Column-wise kurtosis and skewness coefficients
colSort | Sorting of the columns-rows of a matrix
colsums | Column and row-wise sums of a matrix
colTabulate | Column and row-wise tabulate
colTrue | Column-wise true/false value of a matrix
colTrueFalse | Column-wise true/false value of a matrix
columns | Get specific columns/rows fo a matrix
colvarcomps.mle | Many moment and maximum likelihood estimations of variance components
colvarcomps.mom | Many moment and maximum likelihood estimations of variance components
colVars | Column and row-wise variances and standard deviations of a matrix
colVars.data.frame | Column and row-wise variances and standard deviations of a matrix
colVars.matrix | Column and row-wise variances and standard deviations of a matrix
colvm.mle | Column-wise MLE of some univariate distributions
colwatsons | Column-wise uniformity tests for circular data
colweibull.mle | Column-wise MLE of some univariate distributions
comb_n | All k possible combinations from n elements
cor.fbed | FBED variable selection method using the correlation
cor.fsreg | Correlation based forward regression.
cora | Fast covariance and correlation matrix calculation
corpairs | Correlation between pairs of variables
correls | Correlation between a vector and a set of variables
count_value | Row - Wise matrix/vector count the frequency of a value
cova | Fast covariance and correlation matrix calculation
cox.poisrat | Cox confidence interval for the ratio of two Poisson variables
cqtest | Multi-sample tests for vectors
cqtests | Many multi-sample tests
Crossprod | Matrix multiplication, Cross and Tcross product.
ct.mle | MLE of continuous univariate distributions defined on the real line

## -- D --

data.frame.to_matrix | Convert a dataframe to matrix
dcor | Distance correlation
dcor.ttest | Hypothesis test for the distance correlation
dcov | Distance variance and covariance
design_matrix | Design Matrix
Diag.fill | Diagonal Matrix
Diag.matrix | Diagonal Matrix
Digamma | Natural logarithm of the gamma function and its derivatives.
diri.nr2 | Fitting a Dirichlet distribution via Newton-Rapshon
dirimultinom.mle | MLE for multivariate discrete data
dirknn | k-NN algorithm using the arc cosinus distance
dirknn.cv | Cross-Validation for the k-NN algorithm using the arc cosinus distance
Dist | Distance matrix - Sum of all pairwise distances in a distance matrix
dista | Distance between vectors and a matrix - Sum of all pairwise distances in a distance matrix.
dmvnorm | Density of the multivariate normal and t distributions
dmvt | Density of the multivariate normal and t distributions
dvar | Distance variance and covariance

## -- E --

eachcol.apply | Operations between two matrices or matrix and vector
eachrow | Operations between two matrices or matrix and vector
edist | Energy distance between matrices
eel.test1 | Empirical and exponential empirical likelihood tests for one sample
eel.test2 | Empirical and exponential empirical likelihood tests for two samples
eigen.sym | Limited number of eigenvalues and eigenvectors of a symmetric matrix
el.test1 | Empirical and exponential empirical likelihood tests for one sample
el.test2 | Empirical and exponential empirical likelihood tests for two samples
Elem | Iterator
Elem.iterator | Iterator
Elem<- | Iterator
Elem<-.iterator | Iterator
env.copy | Deep copy
exact.ttest2 | Exact t-test for 2 independent samples
exp2.mle | MLE of continuous univariate distributions defined on the positive line
expmle | MLE of continuous univariate distributions defined on the positive line
expregs | Many exponential regressions

## -- F --

fish.kent | Hypothesis test for von Mises-Fisher distribution over Kent distribution
floyd | Floyd-Warshall algorithm for shortest paths in a directed graph
foldnorm.mle | MLE of continuous univariate distributions defined on the positive line
freq.max | Minimum and maximum frequencies of a vector
freq.min | Minimum and maximum frequencies of a vector
fs.reg | Variable selection in generalised linear regression models with forward selection
ftest | Multi-sample tests for vectors
ftests | Many multi-sample tests

## -- G --

g2Test | G-square test of conditional indepdence
g2tests | Many G-square tests of indepedence
g2tests_perm | Many G-square tests of indepedence
g2Test_perm | G-square test of conditional indepdence
g2Test_univariate | Matrix with G-square tests of indepdence
g2Test_univariate_perm | Matrix with G-square tests of indepdence
gammacon | Gamma regression with a log-link
gammamle | MLE of continuous univariate distributions defined on the positive line
gammanb | Naive Bayes classifiers
gammanb.pred | Prediction with some naive Bayes classifiers
gammareg | Gamma regression with a log-link
gammaregs | Many simple regressions for positive valued data
gaussian.nb | Naive Bayes classifiers
gaussiannb.pred | Prediction with some naive Bayes classifiers
gchi2Test | Chi-square and G-square tests of (unconditional) indepdence
geom.anova | Analysis of variance with a count variable
geom.anovas | Many analysis of variance tests with a discrete variable
geom.mle | MLE of count data
geom.nb | Naive Bayes classifiers
geom.regs | Many simple geometric regressions.
geomnb.pred | Prediction with some naive Bayes classifiers
ginis | Many Gini coefficients
glm_logistic | Logistic and Poisson regression models
glm_poisson | Logistic and Poisson regression models
group | Some summary statistics of a vector for each level of a grouping variable.
group.sum | Some summary statistics of a vector for each level of a grouping variable.
groupcorrels | Correlation between a vector and a set of variables
gumbel.mle | MLE of continuous univariate distributions defined on the real line

## -- H --

halfnorm.mle | MLE of continuous univariate distributions defined on the positive line
Hash | Hash object
hash.find | Find the given value in a hash table
Hash.key.multi | Hash object
hash.list | Hash - Pair function
hash2list | Hash object to a list object
hd.eigen | Eigenvalues in high dimensional principal component analysis
hsecant01.mle | MLE of distributions defined in the (0, 1) interval

## -- I --

iag.mle | MLE of (hyper-)spherical distributions
ibeta.mle | MLE of distributions defined in the (0, 1) interval
invdir.mle | MLE of the inverted Dirichlet distribution
invgauss.mle | MLE of continuous univariate distributions defined on the positive line
invgauss.reg | Inverese Gaussian regression with a log-link
invgauss.regs | Many simple regressions for positive valued data
is.symmetric | Check whether a square matrix is symmetric
is_element | Find element
is_integer | Check if values are integers and convert to integer
iterator | Iterator

## -- J --

james | James multivariate version of the t-test

## -- K --

knn | k nearest neighbours algorithm (k-NN)
knn.cv | Cross-Validation for the k-NN algorithm
kruskaltest | Multi-sample tests for vectors
kruskaltests | Many multi-sample tests
kuiper | Uniformity tests for circular data
kurt | Skewness and kurtosis coefficients
kurt.test2 | Hypothesis testing between two skewness or kurtosis coefficients

## -- L --

laplace.mle | MLE of continuous univariate distributions defined on the real line
Lbeta | Natural logarithm of the beta function
Lchoose | Binomial coefficient and its logarithm
length.Hash | Hash object
Lgamma | Natural logarithm of the gamma function and its derivatives.
lindley.mle | MLE of continuous univariate distributions defined on the positive line
list.ftests | Many F-tests with really huge matrices
lmfit | Linear models for large scale data
Log | Natural Logarithm each element of a matrix
logcauchy.mle | MLE of continuous univariate distributions defined on the positive line
logistic.cat1 | Logistic or Poisson regression with a single categorical predictor
logistic.mle | MLE of continuous univariate distributions defined on the real line
logistic_only | Many univariate simple binary logistic regressions
logitnorm.mle | MLE of distributions defined in the (0, 1) interval
loglogistic.mle | MLE of continuous univariate distributions defined on the positive line
lognorm.mle | MLE of continuous univariate distributions defined on the positive line
logseries.mle | MLE of count data
lomax.mle | MLE of continuous univariate distributions defined on the positive line
lower_tri | Lower and Upper triangular of a matrix
lower_tri.assign | Lower and Upper triangular of a matrix

## -- M --

Mad | Column and row-wise mean absolute deviations
mahala | Mahalanobis distance
mat.mat | Number of equal columns between two matrices
mat.mult | Matrix multiplication, Cross and Tcross product.
Match | Match
match.coefs | Column-wise matching coefficients
matrnorm | Generates random values from a normal and puts them in a matrix
maxboltz.mle | MLE of continuous univariate distributions defined on the positive line
mcnemar | Multi-sample tests for vectors
mcnemars | Many 2 sample tests tests
med | Column and row-wise medians of a matrix or median of a vector.
Median | Column and row-wise medians of a matrix or median of a vector.
mediandir | Fast calculation of the spherical and hyperspherical median
min_max | Minimum and maximum of a vector
multinom.mle | MLE for multivariate discrete data
multinom.nb | Naive Bayes classifiers
multinom.reg | Multinomial regression
multinom.regs | Many simple multinomial regressions.
multinomnb.pred | Prediction with some naive Bayes classifiers
multivmf.mle | MLE of (hyper-)spherical distributions
mv.eeltest1 | Exponential empirical likelihood for a one sample mean vector hypothesis testing
mv.eeltest2 | Exponential empirical likelihood hypothesis testing for two mean vectors
mvbetas | Many multivariate simple linear regressions coefficients
mvkurtosis | Multivariate kurtosis
mvlnorm.mle | MLE of the multivariate (log-) normal distribution
mvnorm.mle | MLE of the multivariate (log-) normal distribution
mvt.mle | MLE of the multivariate t distribution

## -- N --

negative | Apply method to Positive and Negative number
negbin.mle | MLE of count data
Norm | Norm of a matrix
normal.mle | MLE of continuous univariate distributions defined on the real line
normlog.mle | MLE of continuous univariate distributions defined on the positive line
normlog.reg | Gaussian regression with a log-link
normlog.regs | Many simple regressions for positive valued data
nth | Column and row-wise nth smallest value of a matrix/vector

## -- O --

odds | Many odds ratio tests
odds.ratio | Odds ratio and relative risk
omp | Orthogonal matching pursuit variable selection
ompr | Orthogonal matching pursuit variable selection
Order | Column and row-wise Order - Sort Indices
ordinal.mle | MLE of the ordinal model without covariates
Outer | Outer function

## -- P --

pareto.mle | MLE of continuous univariate distributions defined on the positive line
pc.skel | The skeleton of a Bayesian network produced by the PC algorithm
percent.ttest | Hypothesis test for two means of percentages
percent.ttests | Many hypothesis tests for two means of percentages
permcor | Permutation based p-value for the Pearson correlation coefficient
permutation | Permutation
permutation.next | Permutation
permutation.prev | Permutation
Pmax | Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices
Pmin | Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices
Pmin_Pmax | Minima and maxima of two vectors/matrices and Column-row wise minima and maxima of two matrices
pois.test | Tests for the dispersion parameter in Poisson distribution
poisdisp.test | Tests for the dispersion parameter in Poisson distribution
poisson.anova | Analysis of variance with a count variable
poisson.anovas | Many analysis of variance tests with a discrete variable
poisson.cat1 | Logistic or Poisson regression with a single categorical predictor
poisson.mle | MLE of count data
poisson.nb | Naive Bayes classifiers
poissonnb.pred | Prediction with some naive Bayes classifiers
poisson_only | Many univariate simple binary logistic regressions
poly.cor | Polyserial correlation
pooled.cov | Pooled covariance matrix
positive | Apply method to Positive and Negative number
positive.negative | Apply method to Positive and Negative number
print.Hash | Hash object
print.iterator | Iterator
print.ufactor | Fast and general represantation of a factor variable
prop.reg | Quasi binomial regression for proportions
prop.regs | Quasi binomial regression for proportions
proptest | Many one sample tests
proptests | Many 2 sample proportions tests

## -- Q --

qpois.reg | Quasi Poisson regression
qpois.regs | Quasi Poisson regression
quasi.poisson_only | Many univariate simple poisson regressions
quasipoisson.anova | Analysis of variance with a count variable
quasipoisson.anovas | Many analysis of variance tests with a discrete variable

## -- R --

racg | Angular central Gaussian random values simulation
Rank | Column and row-wise ranks
rayleigh.mle | MLE of continuous univariate distributions defined on the positive line
rbing | Simulating from a Bingham distribution
rbingham | Simulation of random values from a Bingham distribution with any symmetric matrix
read.directory | Reading the files of a directory
read.examples | Reading the files of a directory
regression | Many univariate simple linear regressions
rel.risk | Odds ratio and relative risk
RemoveFromNamespace | Insert/remove function names in/from the NAMESPACE file
rep_col | Replicate columns/rows
rep_row | Replicate columns/rows
rint.mle | Moment and maximum likelihood estimation of variance components
rint.reg | Random intercepts linear mixed models
rint.regbx | Random intercepts linear mixed models
rint.regs | Many simple linear mixed model regressions
rm.anova | Repeated measures anova
rm.anovas | Many regression based tests for single sample repeated measures
rm.lines | Many regression based tests for single sample repeated measures
rmdp | High dimensional MCD based detection of outliers
rmvlaplace | Multivariate Laplace random values simulation
rmvnorm | Multivariate normal and t random values simulation
rmvt | Multivariate normal and t random values simulation
Rnorm | Simulation of random values from a normal distribution
Round | Round each element of a matrix/vector
rowAll | Column and row-wise Any
rowAny | Column and row-wise Any
rowCountValues | Row - Wise matrix/vector count the frequency of a value
rowcvs | Column and row wise coefficients of variation
rowFalse | Row-wise true value of a matrix
rowhameans | Column and row-wise means of a matrix
rowMads | Column and row-wise mean absolute deviations
rowMaxs | Row-wise minimum and maximum of a matrix.
rowmeans | Column and row-wise means of a matrix
rowMedians | Column and row-wise medians of a matrix or median of a vector.
rowMins | Row-wise minimum and maximum of a matrix.
rowMinsMaxs | Row-wise minimum and maximum of a matrix.
rownth | Column and row-wise nth smallest value of a matrix/vector
rowOrder | Column and row-wise Order - Sort Indices
rowprods | Column and row-wise products
rowrange | Column and row-wise range of values of a matrix.
rowRanks | Column and row-wise ranks
rows | Get specific columns/rows fo a matrix
rowShuffle | Column and row-wise Shuffle
rowSort | Sorting of the columns-rows of a matrix
rowsums | Column and row-wise sums of a matrix
rowTabulate | Column and row-wise tabulate
rowTrue | Row-wise true value of a matrix
rowTrueFalse | Row-wise true value of a matrix
rowVars | Column and row-wise variances and standard deviations of a matrix
rvmf | Random values simulation from a von Mises-Fisher distribution
rvonmises | Random values simulation from a von Mises distribution

## -- S --

score.betaregs | Many score based regressions
score.expregs | Many score based regressions
score.gammaregs | Many score based regressions
score.geomregs | Many score based regressions
score.glms | Many score based regressions
score.invgaussregs | Many score based regressions
score.multinomregs | Many score based regressions
score.negbinregs | Many score based regressions
score.weibregs | Many score based regressions
score.ztpregs | Many score based regressions
sftest | Many Shapiro-Francia normality tests
sftests | Many Shapiro-Francia normality tests
skew | Skewness and kurtosis coefficients
skew.test2 | Hypothesis testing between two skewness or kurtosis coefficients
Sort | Sort - Integer Sort - Sort a vector coresponding to another
Sort.int | Sort - Integer Sort - Sort a vector coresponding to another
sort_cor_vectors | Sort - Integer Sort - Sort a vector coresponding to another
sort_mat | Sorting of the columns-rows of a matrix
sort_unique | Sort and unique
sort_unique.length | Sort and unique
sourceR | Source many R files
sourceRd | Source many R files
spat.med | Spatial median for Euclidean data
spatmed.reg | Spatial median regression
spdinv | Inverse of a symmetric positive definite matrix
spml.mle | MLE of some circular distributions
spml.reg | Circular or angular regression
spml.regs | Many simple circular or angular regressions
squareform | Vector allocation in a symmetric matrix
sscov | Spatial sign covariance matrix
Stack | Represantation of Stack
standardise | Standardisation
submatrix | Sub-matrix

## -- T --

Table | Table Creation - Frequency of each value
Table.sign | Table Creation - Frequency of each value
Tcrossprod | Matrix multiplication, Cross and Tcross product.
tmle | MLE of continuous univariate distributions defined on the real line
tobit.mle | MLE of the tobit model
topological_sort | Topological sort of a DAG
total.dist | Distance matrix - Sum of all pairwise distances in a distance matrix
total.dista | Distance between vectors and a matrix - Sum of all pairwise distances in a distance matrix.
transpose | Transpose of a matrix
Trigamma | Natural logarithm of the gamma function and its derivatives.
ttest | Many one sample tests
ttest1 | One sample t-test for a vector
ttest2 | Multi-sample tests for vectors
ttests | Many 2 sample tests tests
ttests.pairs | Matrix with all pairs of t-tests
twoway.anova | Multi-sample tests for vectors
twoway.anovas | Many two-way ANOVAs

## -- U --

ufactor | Fast and general represantation of a factor variable
univglms | Many univariate generalised linear regressions
univglms2 | Many univariate generalised linear regressions
upper_tri | Lower and Upper triangular of a matrix
upper_tri.assign | Lower and Upper triangular of a matrix

## -- V --

Var | Variance (and standard deviation) of a vector
var2test | Multi-sample tests for vectors
var2tests | Many 2 sample tests tests
varcomps.mle | Moment and maximum likelihood estimation of variance components
varcomps.mom | Moment and maximum likelihood estimation of variance components
vartest | Many one sample tests
vartests | Many multi-sample tests
vecdist | Distance matrix - Sum of all pairwise distances in a distance matrix
vm.mle | MLE of some circular distributions
vmf.mle | MLE of (hyper-)spherical distributions

## -- W --

watson | Uniformity tests for circular data
weib.reg | Weibull regression model
weibull.mle | MLE of continuous univariate distributions defined on the positive line
which.is | Index of the columns of a data.frame which are a specific type
wigner.mle | MLE of continuous univariate distributions defined on the real line
wrapcauchy.mle | MLE of some circular distributions

## -- X --

XopY.sum | Operations between two matrices or matrix and vector

## -- Y --

yule | Yule's Y (coefficient of colligation)

## -- Z --

zip.mle | MLE of count data
ztp.mle | MLE of count data

## -- misc --

!=.iterator | Iterator
==.iterator | Iterator
[.Hash | Hash object
[.ufactor | Fast and general represantation of a factor variable
[<-.Hash | Hash object