Movatterモバイル変換


[0]ホーム

URL:


CRAN Task View: Numerical Mathematics

Maintainer:Hans W. Borchers, Robin Hankin, Serguei Sokol
Contact:hwb at mailbox.org
Version:2025-03-09
URL:https://CRAN.R-project.org/view=NumericalMathematics
Source:https://github.com/cran-task-views/NumericalMathematics/
Contributions:Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see theContributing guide.
Citation:Hans W. Borchers, Robin Hankin, Serguei Sokol (2025). CRAN Task View: Numerical Mathematics. Version 2025-03-09. URL https://CRAN.R-project.org/view=NumericalMathematics.
Installation:The packages from this task view can be installed automatically using thectv package. For example,ctv::install.views("NumericalMathematics", coreOnly = TRUE) installs all the core packages orctv::update.views("NumericalMathematics") installs all packages that are not yet installed and up-to-date. See theCRAN Task View Initiative for more details.

This task view on numerical mathematics lists R packages and functions that are useful for solving numerical problems in linear algebra and analysis. It shows that R is a viable computing environment for implementing and applying numerical methods, also outside the realm of statistics.

The task view willnot cover differential equations, optimization problems and solvers, or packages and functions operating on times series, because all these topics are treated extensively in the corresponding task viewsDifferentialEquations,Optimization, andTimeSeries. All these task views together will provide a good selection of what is available in R for the area of numerical mathematics. TheHighPerformanceComputing task view with its many links for parallel computing may also be of interest.

Contents

The task view has been created to provide an overview of the topic. If some packages are missing or certain topics in numerical math should be treated in more detail, please contact the maintainer, either via e-mail or by submitting an issue or pull request in the GitHub repository linked above.

Numerical Linear Algebra

As statistics is based to a large extent on linear algebra, many numerical linear algebra routines are present in R, and some only implicitly. Examples of explicitly available functions are vector and matrix operations, matrix (QR) decompositions, solving linear equations, eigenvalues/-vectors, singular value decomposition, or least-squares approximation.

Special Functions

Many special mathematical functions are present in R, especially logarithms and exponentials, trigonometric and hyperbolic functions, or Bessel and Gamma functions. Many more special functions are available in contributed packages.

Polynomials

Function polyroot() in base R determines all zeros of a polynomial, based on the Jenkins-Traub algorithm. Linear regression function lm() can perform polynomial fitting when usingpoly() in the model formula (with optionraw = TRUE).

Differentiation and Integration

D() andderiv() in base R compute derivatives of simple expressions symbolically. Functionintegrate() implements an approach for numerically integrating univariate functions in R. It applies adaptive Gauss-Kronrod quadrature and can handle singularities and unbounded domains to a certain extent.

Interpolation and Approximation

Base R provides functionsapprox() for constant and linear interpolation, andspline() for cubic (Hermite) spline interpolation, whilesmooth.spline() performs cubic spline approximation. Base package splines creates periodic interpolation splines in functionperiodicSpline().

Root Finding and Fixed Points

uniroot(), implementing the Brent-Decker algorithm, is the basic routine in R to find roots of univariate functions. There are implementations of the bisection algorithm in several contributed packages. For root finding with higher precision there is functionunirootR() in the multi-precision packageRmpfr. For finding roots of univariate and multivariate functions see the following packages:

Discrete Mathematics and Number Theory

Not so many functions are available for computational number theory. Note that integers in double precision can be represented exactly up to2^53 - 1, above that limit a multi-precision package such asgmp is needed, see below.

Multiprecision and Symbolic Calculations

Python and SAGE Interfaces

Python, through its modules ‘NumPy’, ‘SciPy’, ‘Matplotlib’, ‘SymPy’, and ‘pandas’, has elaborate and efficient numerical and graphical tools available.

SageMath is an open source mathematics system based on Python, allowing to run R functions, but also providing access to systems like Maxima, GAP, FLINT, and many more math programs. SageMath can be freely used through a Web interface atCoCalc .

MATLAB Octave Julia and other Interfaces

Interfaces to numerical computation software such as MATLAB (commercial) or Octave (free) will be important when solving difficult numerical problems. Unfortunately, at the moment there is no package allowing to call Octave functions from within R.

Julia is “a high-level, high-performance dynamic programming language for numerical computing”, which makes it interesting for optimization problems and other demanding scientific computations in R.

Java Math functions can be employed through the ‘rjava’ or ‘rscala’ interfaces. Then packagecommonsMath allows calling Java JAR files of the Apache Commons Mathematics Library, a specialized library for all aspects of numerics, optimization, and differential equations.

Please note that commercial programs such as MATLAB, Maple, or Mathematica have facilities to call R functions.

CRAN packages

Core:cubature,Matrix,numDeriv,PolynomF.
Regular:ADPF,akima,arrangements,BB,Bessel,bignum,Brobdingnag,bspline,calculus,caracas,Carlson,clifford,combinat,commonsMath,conicfit,contfrac,contFracR,daarem,Deriv,disordR,dual,EigenR,elliptic,expint,expm,fastGHQuad,feather,features,FixedPoint,flint,fourierin,frab,freealg,freegroup,gaussquad,geigen,gmp,GramQuad,gsl,hypergeo,interp,irlba,itp,jack,jacobi,jordan,JuliaCall,JuliaConnectoR,ktsolve,lamW,logOfGamma,m2r,magic,MASS,matlab,matlib,matrixcalc,mbend,minimaxApprox,MonoPoly,mpoly,multipol,mvp,mvQuad,nleqslv,numbers,onion,optR,orthopolynom,Pade,partitions,permutations,polyCub,polyMatrix,polynom,pracma,primefactr,primes,PRIMME,qspray,QZ,R.matlab,rARPACK,Rcpp,RcppAlgos,RcppArmadillo,RcppBigIntAlgos,RcppEigen,RcppGSL,reticulate,rim,Rlinsolve,rmatio,Rmpfr,rmumps,RootsExtremaInflections,rootSolve,Rserve,RSpectra,Ryacas,sanic,schumaker,signal,SimplicialCubature,SparseGrid,SparseM,SphericalCubature,splines2,spray,SQUAREM,statmod,stinepack,stokes,svd,symengine,tripack,turboEM,VeryLargeIntegers,weyl,XR,XRPython,Zseq.
Archived:XRJulia.

Related links

Other resources


[8]ページ先頭

©2009-2025 Movatter.jp