R Source Codes
r_src,
program in the R programming language,
for statistical computation and graphics.
More information can be found at
https://www.r-project.org/.
-
adamsbashforth,
an R code which
uses the Adams Bashforth method to solve an
ordinary differential equation (ODE).
-
adamsbashforth_test
-
adaptint,
an R code which
estimates an integral using an adaptive midpoint quadrature rule.
-
adaptint_test
-
backward_euler,
an R code which
implements the (implicit) backward Euler method for solving
an ordinary differential equation (ODE).
-
backward_euler_test
-
batch,
R programs which
illustrate how a set of R commands can be executed in "batch mode".
-
bilinear,
an R code which
evaluates a bilinear interpolant.
-
bilinear_test
-
bisection,
an R code which
applies the bisection method to seek a root of f(x)
over a change-of-sign interval a <= x <= b.
-
bisection_test
-
bvpexample,
an R code which
determines the correct additional initial condition to convert a
boundary value problem (BVP) into an initial value problem (IVP).
-
bvpexample_test
-
cbezier,
an R code which
evaluates a cubic Bezier curve.
-
cbezier_test
-
choleskymatrix,
an R code which
computes the Cholesky L L' factorization of a matrix.
-
choleskymatrix_test
-
cubicspline,
an R code which
computes the cubic spline interpolant to data.
-
cubicspline_test
-
csv_io,
an R code which
illustrates how to read or write comma separated value (CSV) files.
-
discmethod,
an R code which
estimates the volume inside a surface of revolution
using the disc method.
-
discmethod_test
-
eros,
an R code which
implements the Elementary Row Operations (ERO) used to define many
matrix algorithms.
-
eros_test
-
euler,
an R code which
uses the forward Euler method to solve an ordinary differential
equation (ODE).
-
euler_test
-
eulersys,
an R code which
uses the forward Euler method to solve a system of ordinary
differential equations (ODE).
-
eulersys_test
-
fibonacci,
an R code which
evaluates the Fibonacci sequence.
-
fibonacci_test
-
findiff,
an R code which
applies the forward finite difference formula to a function.
-
findiff_test
-
fsolve_test,
an R code which
calls fsolve() which
seeks the solution x of one or more nonlinear equations f(x)=0.
-
gauss_seidel,
an R code which
uses Gauss Seidel iteration to solve a linear system with a
symmetric positive definite (SPD) matrix.
-
gauss_seidel_test
-
gaussint,
an R code which
estimates an integral using a Gauss quadrature rule.
-
gaussint_test
-
gd,
an R code which
seeks a minimizer of a multivariate function using gradient descent.
-
gd_test
-
gdls,
an R code which
uses gradient_descent to solve a least squares problem.
-
gdls_test
-
giniquintile,
an R code which
computes the Gini quintile.
-
giniquintile_test
-
goldsectmax,
an R code which
seeks a maximizer of a function using golden section search.
-
goldsectmax_test
-
gradasc,
an R code which
seeks a maximizer of a function using gradient ascent.
-
gradasc_test
-
graddsc,
an R code which
seeks a minimizer of a function using gradient descent.
-
graddsc_test
-
graphics_test,
R programs which
demonstrate how to make various kinds of plots.
-
heat,
an R code which
solves the 1D heat equation using the forward time centered space
(FTCS) method.
-
heat_test
-
hello,
an R code which
prints out "Hello, world!".
-
hello_test
-
hillclimbing,
an R code which
seeks a minimizer of a function using the hill climbing method.
-
hillclimbing_test
-
horner,
an R code which
evaluates a polynomial using Horner's method.
-
horner_test
-
is_prime,
an R code which
is true if a given integer n is prime.
-
is_prime_test
-
jacobi,
an R code which
uses Jacobi iteration to solve a linear system with a
symmetric positive definite (SPD) matrix.
-
jacobi_test
-
leastsquares,
an R code which
solves an overdetermined linear system using the normal equations.
-
leastsquares_test
-
linear_lab,
a laboratory exercise which looks for linear relationships between
statistical data extracted from a file.
-
linterp,
an R code which
finds the line between two data points.
-
linterp_test
-
local_min,
an R code which
finds a local minimizer of a scalar function of a scalar variable,
by Richard Brent.
-
local_min_test
-
lumatrix,
an R code which
computes the Lower-Upper (LU) triangular factorization of a matrix.
-
lumatrix_test
-
machine,
an R code which
returns values of the
constants associated with computer arithmetic.
-
machine_test
-
mcint,
an R code which
estimates an integral using the Monte Carlo method.
-
mcint_test
-
mcint2,
an R code which
estimates an integral over a rectangle using the Monte Carlo method.
-
mcint2_test
-
midpoint,
an R code which
solves one or more ordinary differential equations (ODE)
using the (implicit) midpoint method, solving the implicit equation
using fsolve() from the pracma library of Hans Borchers.
-
midpoint_test
-
midpoint_explicit,
an R code which
solves one or more ordinary differential equations (ODE)
using the (explicit) midpoint method, also called the
modified Euler method.
-
midpoint_explicit_test
-
midpoint_fixed,
an R code which
solves one or more ordinary differential equations (ODE)
using the (implicit) midpoint method, for which the
nonlinear equation is solved using a fixed point method.
-
midpoint_fixed_test
-
midpoint_quad,
an R code which
estimates an integral using the midpoint quadrature rule.
-
midpoint_quad_test
-
newton,
an R code which
seeks a root of a function using the Newton method.
-
newton_test
-
nn,
an R code which
does nearest neighbor interpolation.
-
nn_test
-
nth_root,
an R code which
uses Newton's method to find the n-th root of a number.
-
nth_root_test
-
persistence,
an R code which
demonstrates how to initialize, get, or set data stored
within a function, using static/persistent/saved/local memory.
-
persistence_test
-
plot_lab,
a laboratory exercise which considers the various kinds of plots
that can be made using R.
-
polyinterp,
an R code which
sets up Vandermonde polynomial interpolation.
-
polyinterp_test
-
pwiselinterp,
an R code which
finds the intercept and slope for a sequence of
piecewise linear interpolants.
-
pwiselinterp_test
-
qbezier,
an R code which
evaluates a quadratic Bezier curve.
-
qbezier_test
-
quadratic,
an R code which
computes the roots of a quadratic equation ax^2+bx+c=0.
-
quadratic_test
-
r8lib,
an R code which
contains utilities for real 64 bit (R8) arithmetic.
-
r8lib_test
-
refmatrix,
an R code which
computes the Row Echelon Form (REF) of a matrix.
-
refmatrix_test
-
resizeImageBL,
an R code which
resizes an image using bilinear interpolation.
-
resizeImageBL_test
-
resizeImageNN,
an R code which
resizes an image using nearest neighbor interpolation.
-
resizeImageNN_test
-
romberg,
an R code which
estimates an integral using Romberg extrapolation.
-
romberg_test
-
rrefmatrix,
an R code which
computes the Reduced Row Echelon Form (RREF) of a matrix.
-
rrefmatrix_test
-
rk4,
an R code which
uses the 4th order Runge-Kutta method to solve an
ordinary differential equation (ODE).
-
rk4_test
-
sa,
an R code which
seeks a minimizer of a function using simulated annealing.
-
sa_test
-
secant,
an R code which
seeks a root of a function using the secant method.
-
secant_test
-
select_lab,
a laboratory exercise which investigates how to create datasets
in which some values are missing or unknown, how to select
a portion of a data set for analysis, and how to merge items
of data.
-
shellmethod,
an R code which
estimates the volume inside a surface of revolution
using the shell method.
-
shellmethod_test
-
simp,
an R code which
estimates an integral using Simpson's quadrature rule.
-
simp_test
-
simp38,
an R code which
estimates an integral using Simpson's 3/8 quadrature rule.
-
simp38_test
-
solvematrix,
an R code which
solves a linear system by transforming it to
Reduced Row Echelon Form (RREF).
-
solvematrix_test
-
stiff_ode,
an R code which
considers an ordinary differential equation (ODE) which is
an example of a stiff ODE.
-
stiff_ode_test
-
symdiff,
an R code which
applies the symmetric finite difference formula to a function.
-
symdiff_test
-
tester,
a BASH script which runs the test programs.
-
timestamp,
an R code which
prints the current YMDHMS date as a timestamp.
-
timestamp_test
-
trapezoid,
an R code which
estimates an integral using the trapezoid quadrature rule.
-
trapezoid_test
-
trapezoidal,
an R code which
implements the (implicit) trapezoidal method for solving
an ordinary differential equation (ODE), using fsolve() to
handle the implicit equation, adapted from
the pracma library of Hans Borchers.
-
trapezoidal_test
-
trapezoidal_fixed,
an R code which
implements the (implicit) trapezoidal method for solving
an ordinary differential equation (ODE), using a fixed point
method to handle the implicit equation, adapted from
the pracma library of Hans Borchers.
-
trapezoidal_fixed_test
-
tridiagmatrix,
an R code which
solves a linear system with a tridiagonal matrix.
-
tridiagmatrix_test
-
tspsa,
an R code which
solves the traveling salesperson problem using simulated annealing.
-
tspsa_test
-
vecnorm,
an R code which
computes the L2 norm of a vector.
-
vecnorm_test
-
wave,
an R code which
solves the 1D wave equation using the finite difference method.
-
wave_test
-
xls_io,
R codes which
illustrate how the Microsoft EXCEL program can share data with R.
-
zero_brent,
an R code which
finds a zero of a scalar function of a scalar variable,
by Richard Brent.
-
zero_brent_test
Last revised on 12 June 2021.