Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lib-r-math.js

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lib-r-math.js

Javascript Pure Implementation of Statistical R "core" numerical libRmath.so

  • 1.0.25
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
decreased by-16.35%
Maintainers
1
Weekly downloads
 
Created
Source

libRmath.js

Javascript ( TypeScript ) Pure Implementation of Statistical R "core" numerical libRmath.so library found here https://svn.r-project.org/R/trunk/src/nmath/

Progress (DONE and TODO)

Work in progress (see list below of all c modules that need to be ported), please considering helping out and bring R core functionality to Javascript.

I first list the modules DONE so far, lets start at a positive note)

DONE

original c modulejs/ts module nameport dateR - base functions
rgeom.c./lib/rgeom.ts21 March 2017Random variates from the geometric distribution.
rgamma.c./lib/rgamma.ts21 march 2017Random variates from the gamma distribution.
rf.c./lib/rf.ts21 march 2017Pseudo-random variates from an F distribution.
rexp.c./lib/rexp.ts21 march 2017Random variates from the exponential distribution.
rchisq.c./lib/rchisq.ts21 march 2017Random variates from the chi-squared distribution.
rcauchy.c./lib/rcauchy.ts21 march 2017Random variates from the Cauchy distribution.
rbeta.c./lib/rbeta.ts21 march 2017Generating beta variates with nonintegral shape parameters.
rbinom.c./lib/rbindom.ts21 March 2017Random variates from the binomial distribution.
qweibull.c./lib/qweibull.ts20 March 2017The quantile function of the Weibull distribution.
qtukey.c./lib/qtukey.ts20 March 2017Computes the quantiles of the maximum of rr studentized ranges
qt.c./lib/qt.ts20 March 2017The "Student" t distribution quantile function.
qpois.c./lib/qpois.ts19 March 2017The quantile function of the Poisson distribution.
qnt.c./lib/qnt.ts19 March 2017quantily function of the commulative probability of the non-central t-distribution
qnchisq.c./lib/qnchisq.ts19 Marchthe quantile function of the noncentral chi-squared distribution
qnf.c./lib/qnf.ts19 MarchThe quantile function of the non-central F distribution.
qnbinom.c./lib/qnbinom.ts19 March 2017The quantile function of the negative binomial distribution.
qnbeta.c./lib/qnbeta.ts19 March 2017the quantile function of the noncentral beta distribution
qlnorm.c./lib/qlnorm.ts19 March 2017This the lognormal quantile function.
qhyper.c./lib/qhyper.ts19 March 2017The quantile function of the hypergeometric distribution.
qgeom.c./lib/qgeom.ts19 March 2017The quantile function of the geometric distribution.
qgamma.c./lib/qgamma.ts18 March 2017Compute the quantile function of the gamma distribution.
qf.c./lib/qf.ts18 March 2017The quantile function of the F distribution.
qexp.c./lib/qexp.ts18 March 2017The quantile function of the exponential distribution.
qcauchy.c./lib/qcauchy.ts18 March 2017The quantile function of the Cauchy distribution.
qchisq.c./lib/qchisq.ts18 Match 2017The quantile function of the chi-squared distribution.
qbinom.c./lib/qbinom.ts18 March 2017The quantile function of the binomial distribution.
qbeta.c./lib/qbeta.ts18 March 2017The quantile function of the beta distribution.
pweibull.c./lib/pweibull.ts18 Match 2017The distribution function of the Weibull distribution.
punif.c./lib/punif.ts18 Match 2017The distribution function of the uniform distribution.
ptukey.c./lib/ptukey.ts18 March 2017Computes the probability that the maximum of rr studentized ranges, each based on cc means and with df degrees of freedom for the standard error, is less than q.
pnorm.c./lib/pnorm.ts17 March 2017normal distribution function
ppois.c./lib/pois.ts17 March 2017The distribution function of the Poisson distribution.
pt.c./lib/pt.ts16 Marcht distrib. with n degrees of freedom).
polygamma.c./lib/polygamma.c16 MarchCompute the derivatives of the psi function and polygamma functions.
pnt.c./lib/pnt.ts16 MarchCumulative probability at t of the non-central t-distribution, with df degrees of freedom (may be fractional) and non-centrality, parameter delta.
pnf.c./lib/pnf.ts15 MarchThe distribution function of the non-central F distribution.
pnchisq.c./lib/pnchisq.tc14 MarchAlgorithm AS275: Computing the non-central chi-squared distribution function.
pnbinom.c./lib/pnbinom.ts14 MarchThe distribution function of the negative binomial distribution.
pnbeta.c./lib/pnbeta.ts14 Marchpbeta - incomplete-beta function {nowadays: pbeta_raw() -> bratio()}
plogis.c./lib/plogis.ts14 MarchCompute log(1 + exp(x)) without overflow (and fast for x > 18)
plnorm.c./lib/plnorm.ts14 Marchn The lognormal distribution function.
phyper.c./lib/phyper.ts14 MarchThe distribution function of the geometric distribution.
pgamma.c./lib/pgamma.ts14 MarchThis function computes the distribution function for the gamma distribution
pgeom.c./lib/pgeom.ts14 MarchThe distribution function of the geometric distribution.
pf.c./lib/pf.ts14 March 2017The distribution function of the F distribution.
pexp.c./lib/pexp.ts14 March 2017The distribution function of the exponential distribution.
pcauchy.c./lib/pauchy.ts14 March 2017The distribution function of the Cauchy distribution.
pchisq.c./lib/pschisq.ts14 March 2017The distribution function of the chi-squared distribution.
pbinom.c./lib/pbinom.ts14 March 2017The distribution function of the binomial distribution.
Toms708.java./lib/Toms708.ts14 March 2017from Java Version James Curran (j.curran@auckland.ac.nz) (Java version)
pbeta.c./lib/pbeta.ts14 March 2017beta distribution function
pnorm.c./lib/pnorm.ts9 March 2017Normal distribution function
gammalims.c./lib/gammalims.ts5 march 2017calculates legal bounds of gamme_fn
fround.c./lib/fround.ts5 march 2017rounds off to a set number of digites
fprec.c./lib/fprec.ts4 march 2017Returns the value of x rounded to "digits" significant
expm1.c./lib/expm1.ts4 march 2017Compute the Exponential minus 1
dweibull.c./lib/dweibull.ts4 march 2017The density function of the Weibull distribution.
dt.c./lib/dt.ts4 March 2017The t density
dpois.c./lib/dpois.ts4 March 2017dpois() computes the Poisson probability lb^x exp(-lb) / x!
dnchisq.c./lib/dnchisq.ts4 March 2017The density of the noncentral chi-squared distribution with "df"
dnt.c./lib/dnt.ts4 March 2017Computes the density of the noncentral beta distribution with
dnorm.c./lib/dnorm.ts25 feb 2017Compute the density of the normal distribution.
dnf.c./lib/dnt.ts25 feb 2017The density function of the non-central F distribution
dnbinom.c./lib/dnbinom.ts25 feb 2017Computes the negative binomial distribution.
dlogis.c./lib/dlogis.ts4 March 2017The density of the Logistic Distribution
dlnorm.c./lib/dlnorm.ts4 March 2017The density of the lognormal distribution.
dhyper.c./lib/dhyper.ts4 March 2017The hypergeometric probability
dgeom.c./lib/dgeom.ts4 March 2017Computes the geometric probabilities, Pr(X=x) = p(1-p)^x.
dnbeta.c./lib/dnbeta.ts4 March 2017Computes the density of the noncentral beta distribution with
pgamma.c./lib/pgamme.ts9 March 2017This function computes the distribution function for the gamma distribution
dcauchy.c./lib/dcauchy.ts27 feb 2017The density of the Cauchy distribution.
dexp.c./lib/dexp.ts27 feb 2017The density of the exponential distribution.
df.c./lib/df.ts27 feb 2017The density function of the F distribution.
dchisq.c./lib/dchisq.tsfeb 27, 2017The density of the chi-squared distribution.
dgamma.c./lib/dgamma.ts27 feb 2017Computes the density of the gamma distribution
fmax2.cpart of ./lib/_general.ts25 jan 2017this function is moved to module ./lib/_general.ts
fmin2.cpart of ./lib/_general.ts25 jan 2017this function is moved to module ./lib/_general.ts
fsign.c./lib/fsign.tsMArch 5, 2017This function performs transfer of sign.
ftrunc.cpart of ./lib/_general.tsMarch 5 2017floating point truncation
lbeta.c./lib/lbeta.tsMarch 2 2017This function returns the value of the log beta function.
C99 gamma function./lib/c99_gamma.ts25 feb 2017added C99 gamma and lgamma,
dnbinom.c./lib/dnbinom.ts25 feb 2017negative binomial distribution.
dbeta.c./lib/dbeta.ts25 feb 2017R "dbeta" beta distribution function
dbinom.c./lib/dbinom.ts25 feb 2017probability mass function of binomial distribution
log1p.c./lib/log1p.ts25 feb 2017calculate log(1+x) for small value of x
choose.cchoose.ts21 feb 2017R "choose" function, C(n,k) binomial coefficients
gamma_cody.cgamme_cody.ts19 feb 2017GAMMA function using algo of W. J. Cody,
bessel_i.cbessel_i.ts19 feb 2017besseli
bessel_j.cbessel_j.ts19 feb 2017besselj
bessel_k.cbessel_k.ts19 feb 2017besselK
bessel_y.cbessel_y.ts19 feb 2017bessely
sexp.c./sexp.ts8-feb-2017(Random variates from the standard exponential distribution) exp_rand (internally used) function
dunif.c./dunif.ts8-feb-2017R "dunif" function
bessel_k.c./bessel_k.ts8-feb-2017R "besselK" function http://www.netlib.org/specfun/rkbesl
runif.c./runif.ts4-feb-2017implemented 3 RNG and native browser/node agnostic 64 RNG map to floating number
bd0.c./lib/bd0.ts23-jan-2017hidden, used by modules dbinom.c ,dpois.c dt.c
beta.c./lib/beta.ts23-jan-2017beta
chebyshev.c./lib/chebyshev.ts23-jan-2017chebyshev_init , chebyshev_eval
cospi.c./lib/cospi.ts23-jan-2017cospi, sinpi, tanpi
gamma.c./lib/gamma_fn.ts23-jan-2017[gammafn] gamme function(https://en.wikipedia.org/wiki/Gamma_function)
lgamma.c./lib/lgamma_fn.ts23-jan-2017logarithmic gamma lgammafn
lgammacor.c./lib/lgammecor.ts23-jan-2017lgammacor
stirlerr.c./lib/stirlerr23-jan-2017Computes the log of the error term in Stirling's formula ( stirlerr )

TODO

original c moduleported to javascript?testedR - base functions
bd0.cdonenohidden, used by modules dbinom.c ,dpois.c dt.c
bessel_i.cdonenoR "besseli" Modified Bessel function of first kind.
bessel_j.cdonenoR "besselj" gives the Bessel function of the first kind.
bessel_k.cdonenoR "besselK" function http://www.netlib.org/specfun/rkbesl
bessel_y.cdonenoR "bessely" gives the Bessel function of the second kind .
beta.cdonenobeta
chebyshev.cdone ./lib/chebyshev.tsnochebyshev_init , chebyshev_eval
choose.cdonenoR "choose" function, C(n,k) binomial coefficients
cospi.cdone ./lib/cospi.tsnocospi, sinpi, tanpi
d1mach.cdonenoincluded in ./_general.ts
dbeta.cdonenodistribution function of beta
dbinom.cdonenoprobability mass function of binomial distribution
dcauchy.cdonenoThe density of the Cauchy distribution.
dchisq.cdonenoThe density of the chi-squared distribution.
dexp.cdonenoThe density of the exponential distribution.
df.cdonenoThe density function of the F distribution.
dgamma.cdonenoComputes the density of the gamma distribution,
dgeom.cdonenoComputes the geometric probabilities, Pr(X=x) = p(1-p)^x
dhyper.cdonenoThe hypergeometric probability
dlnorm.cdonenoThe density of the lognormal distribution.
dlogis.cdonenoThe density of the Logistic Distribution
dnbeta.cdonenoComputes the density of the noncentral beta distribution with
dnbinom.cdonenonegative binomial probability prob mass function
dnchisq.cdonenoThe density of the noncentral chi-squared distribution with "df"
dnf.cdonenoThe density function of the non-central F distribution
dnorm.cdonenoCompute the density of the normal distribution.
dnt.cdonenothe non-central t density
dpois.cdonenodpois() computes the Poisson probability lb^x exp(-lb) / x!
dt.cdonenoThe t density
dunif.cdonenoR "dunif" function
dweibull.cdonenoThe density function of the Weibull distribution.
expm1.cdonenoCompute the Exponential minus 1
fmax2.cdonenothis function is moved to module ./lib/_general.ts
fmin2.cdonenothis function is moved to module ./lib/_general.ts
fprec.cdonenoReturns the value of x rounded to "digits" significant
fround.cdonenofround function
fsign.cdonenoThis function performs transfer of sign.
ftrunc.cdonenofloating point truncation
gamma.cdone ./lib/gamma_fn.tsnogammafn
gamma_cody.cdonenoGAMMA function using algo of W. J. Cody,
gammalims.cdonenocalculates legal bounds of gamma_fn
i1mach.cdonenotransferred to _general.ts
imax2.cdonenotransferred to _general.ts
imin2.cdonenotransferred to _general.ts
lbeta.cdonenoThis function returns the value of the log beta function.
lgamma.cdone ./lib/lgamma_fn.tsnologarithmic gamma lgammafn
lgammacor.cdone ./lib/lgammecor.tsnolgammacor
log1p.cdonenocalculate log(1+x) with high accuracy for small x
mlutils.cdonenomoved to _general.ts
pbeta.cdonenopBeta distribution function
pbinom.cdonenoThe distribution function of the binomial distribution.
pcauchy.cdonenoThe distribution function of the Cauchy distribution.
pchisq.cdonenoThe distribution function of the chi-squared distribution.
pexp.cdonenoThe distribution function of the exponential distribution.
pf.cdonenoThe distribution function of the F distribution.
pgamma.cdonenoThis function computes the distribution function for the gamma distribution
pgeom.cdonenoThe distribution function of the geometric distribution.
phyper.cdonenoThe distribution function of the geometric distribution.
plnorm.cdonenoThe lognormal distribution function.
plogis.cdonenoCompute log(1 + exp(x)) without overflow (and fast for x > 18)
pnbeta.cdonenopbeta - incomplete-beta function {nowadays: pbeta_raw() -> bratio()}
pnbinom.cdonenoThe distribution function of the negative binomial distribution.
pnchisq.cdonenoAlgorithm AS275: Computing the non-central chi-squared distribution function.
pnf.cdonenoThe distribution function of the non-central F distribution.
pnorm.cdonenonormal distribution function
pnt.cdonenoCumulative probability at t of the non-central t-distribution, with df degrees of freedom (may be fractional) and non-centrality, parameter delta.
polygamma.cdonenoCompute the derivatives of the psi function and polygamma functions.
ppois.cdonenoThe distribution function of the Poisson distribution.
pt.cdonenot distrib. with n degrees of freedom).
ptukey.cdonenoComputes the probability that the maximum of rr studentized ranges, each based on cc means and with df degrees of freedom for the standard error, is less than q.
punif.cdonenoThe distribution function of the uniform distribution.
pweibull.cdonenoThe distribution function of the Weibull distribution.
qbeta.cdonenoThe quantile function of the beta distribution.
qbinom.cdonenoThe quantile function of the binomial distribution.
qcauchy.cdonenoThe quantile function of the Cauchy distribution.
qchisq.cdonenoThe quantile function of the chi-squared distribution.
qexp.cdonenoThe quantile function of the exponential distribution.
qf.cdonenoThe quantile function of the F distribution.
qgamma.cdonenoCompute the quantile function of the gamma distribution.
qgeom.cdonenoThe quantile function of the geometric distribution.
qhyper.cdonenoThe quantile function of the hypergeometric distribution.
qlnorm.cdonenoThis the lognormal quantile function.
qlogis.cdonenoThe Logistic Distribution quantile function.
qnbeta.cdonenothe quantile function of the noncentral beta distribution
qnbinom.cdonenoThe quantile function of the negative binomial distribution.
qnchisq.cdonenothe quantile function of the noncentral chi-squared distribution
qnf.cdonenoThe quantile function of the non-central F distribution.
qnorm.cdonenoCompute the quantile function for the normal distribution.
qnt.cdonenoquantily function of the commulative probability of the non-central t-distribution
qpois.cdonenoThe quantile function of the Poisson distribution.
qt.cdonenoThe "Student" t distribution quantile function.
qtukey.cdonenoComputes the quantiles of the maximum of rr studentized ranges
qunif.cdonenoThe quantile function of the uniform distribution.
qweibull.cdonenoThe quantile function of the Weibull distribution.
rbeta.cdonenoGenerating beta variates with nonintegral shape parameters.
rbinom.cdonenoRandom variates from the binomial distribution.
rcauchy.cdonenoRandom variates from the Cauchy distribution.
rchisq.cdonenoRandom variates from the chi-squared distribution.
rexp.cdonenoRandom variates from the exponential distribution.
rf.cdonenoPseudo-random variates from an F distribution.
rgamma.cdonenoRandom variates from the gamma distribution.
rgeom.cdonenoRandom variates from the geometric distribution.
rhyper.cTODO
rlnorm.cTODO
rlogis.cTODO
rmultinom.cTODO
rnbinom.cTODO
rnchisq.cTODO
rnorm.cTODO
rpois.cTODO
rt.cTODO
runif.cdonenoimplemented 3 RNG and native browser/node agnostic 64 RNG map to floating number
rweibull.cTODO
sexp.cdoneno(Random variates from the standard exponential distribution) exp_rand (internally used) function
sign.cTODO
signrank.cTODO
snorm.cTODO
stirlerr.cdone ./lib/stirlerrnoComputes the log of the error term in Stirling's formula ( stirlerr )
toms708.cNAPnoported instead Java Version from James Curran (j.curran@auckland.ac.nz) (Java version)
wilcox.cTODO

Also: Examine the usage of R_DT_Log and * R_DT_log* (note the one captial letter difference) functions in all codes

Keywords

FAQs

Package last updated on 22 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc