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/.

  1. adamsbashforth, an R code which uses the Adams Bashforth method to solve an ordinary differential equation (ODE).
  2. adamsbashforth_test
  3. adaptint, an R code which estimates an integral using an adaptive midpoint quadrature rule.
  4. adaptint_test
  5. backward_euler, an R code which implements the (implicit) backward Euler method for solving an ordinary differential equation (ODE).
  6. backward_euler_test
  7. batch, R programs which illustrate how a set of R commands can be executed in "batch mode".
  8. bilinear, an R code which evaluates a bilinear interpolant.
  9. bilinear_test
  10. 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.
  11. bisection_test
  12. bvpexample, an R code which determines the correct additional initial condition to convert a boundary value problem (BVP) into an initial value problem (IVP).
  13. bvpexample_test
  14. cbezier, an R code which evaluates a cubic Bezier curve.
  15. cbezier_test
  16. choleskymatrix, an R code which computes the Cholesky L L' factorization of a matrix.
  17. choleskymatrix_test
  18. cubicspline, an R code which computes the cubic spline interpolant to data.
  19. cubicspline_test
  20. csv_io, an R code which illustrates how to read or write comma separated value (CSV) files.
  21. discmethod, an R code which estimates the volume inside a surface of revolution using the disc method.
  22. discmethod_test
  23. eros, an R code which implements the Elementary Row Operations (ERO) used to define many matrix algorithms.
  24. eros_test
  25. euler, an R code which uses the forward Euler method to solve an ordinary differential equation (ODE).
  26. euler_test
  27. eulersys, an R code which uses the forward Euler method to solve a system of ordinary differential equations (ODE).
  28. eulersys_test
  29. fibonacci, an R code which evaluates the Fibonacci sequence.
  30. fibonacci_test
  31. findiff, an R code which applies the forward finite difference formula to a function.
  32. findiff_test
  33. fsolve_test, an R code which calls fsolve() which seeks the solution x of one or more nonlinear equations f(x)=0.
  34. gauss_seidel, an R code which uses Gauss Seidel iteration to solve a linear system with a symmetric positive definite (SPD) matrix.
  35. gauss_seidel_test
  36. gaussint, an R code which estimates an integral using a Gauss quadrature rule.
  37. gaussint_test
  38. gd, an R code which seeks a minimizer of a multivariate function using gradient descent.
  39. gd_test
  40. gdls, an R code which uses gradient_descent to solve a least squares problem.
  41. gdls_test
  42. giniquintile, an R code which computes the Gini quintile.
  43. giniquintile_test
  44. goldsectmax, an R code which seeks a maximizer of a function using golden section search.
  45. goldsectmax_test
  46. gradasc, an R code which seeks a maximizer of a function using gradient ascent.
  47. gradasc_test
  48. graddsc, an R code which seeks a minimizer of a function using gradient descent.
  49. graddsc_test
  50. graphics_test, R programs which demonstrate how to make various kinds of plots.
  51. heat, an R code which solves the 1D heat equation using the forward time centered space (FTCS) method.
  52. heat_test
  53. hello, an R code which prints out "Hello, world!".
  54. hello_test
  55. hillclimbing, an R code which seeks a minimizer of a function using the hill climbing method.
  56. hillclimbing_test
  57. horner, an R code which evaluates a polynomial using Horner's method.
  58. horner_test
  59. is_prime, an R code which is true if a given integer n is prime.
  60. is_prime_test
  61. jacobi, an R code which uses Jacobi iteration to solve a linear system with a symmetric positive definite (SPD) matrix.
  62. jacobi_test
  63. leastsquares, an R code which solves an overdetermined linear system using the normal equations.
  64. leastsquares_test
  65. linear_lab, a laboratory exercise which looks for linear relationships between statistical data extracted from a file.
  66. linterp, an R code which finds the line between two data points.
  67. linterp_test
  68. local_min, an R code which finds a local minimizer of a scalar function of a scalar variable, by Richard Brent.
  69. local_min_test
  70. lumatrix, an R code which computes the Lower-Upper (LU) triangular factorization of a matrix.
  71. lumatrix_test
  72. machine, an R code which returns values of the constants associated with computer arithmetic.
  73. machine_test
  74. mcint, an R code which estimates an integral using the Monte Carlo method.
  75. mcint_test
  76. mcint2, an R code which estimates an integral over a rectangle using the Monte Carlo method.
  77. mcint2_test
  78. 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.
  79. midpoint_test
  80. 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.
  81. midpoint_explicit_test
  82. 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.
  83. midpoint_fixed_test
  84. midpoint_quad, an R code which estimates an integral using the midpoint quadrature rule.
  85. midpoint_quad_test
  86. newton, an R code which seeks a root of a function using the Newton method.
  87. newton_test
  88. nn, an R code which does nearest neighbor interpolation.
  89. nn_test
  90. nth_root, an R code which uses Newton's method to find the n-th root of a number.
  91. nth_root_test
  92. persistence, an R code which demonstrates how to initialize, get, or set data stored within a function, using static/persistent/saved/local memory.
  93. persistence_test
  94. plot_lab, a laboratory exercise which considers the various kinds of plots that can be made using R.
  95. polyinterp, an R code which sets up Vandermonde polynomial interpolation.
  96. polyinterp_test
  97. pwiselinterp, an R code which finds the intercept and slope for a sequence of piecewise linear interpolants.
  98. pwiselinterp_test
  99. qbezier, an R code which evaluates a quadratic Bezier curve.
  100. qbezier_test
  101. quadratic, an R code which computes the roots of a quadratic equation ax^2+bx+c=0.
  102. quadratic_test
  103. r8lib, an R code which contains utilities for real 64 bit (R8) arithmetic.
  104. r8lib_test
  105. refmatrix, an R code which computes the Row Echelon Form (REF) of a matrix.
  106. refmatrix_test
  107. resizeImageBL, an R code which resizes an image using bilinear interpolation.
  108. resizeImageBL_test
  109. resizeImageNN, an R code which resizes an image using nearest neighbor interpolation.
  110. resizeImageNN_test
  111. romberg, an R code which estimates an integral using Romberg extrapolation.
  112. romberg_test
  113. rrefmatrix, an R code which computes the Reduced Row Echelon Form (RREF) of a matrix.
  114. rrefmatrix_test
  115. rk4, an R code which uses the 4th order Runge-Kutta method to solve an ordinary differential equation (ODE).
  116. rk4_test
  117. sa, an R code which seeks a minimizer of a function using simulated annealing.
  118. sa_test
  119. secant, an R code which seeks a root of a function using the secant method.
  120. secant_test
  121. 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.
  122. shellmethod, an R code which estimates the volume inside a surface of revolution using the shell method.
  123. shellmethod_test
  124. simp, an R code which estimates an integral using Simpson's quadrature rule.
  125. simp_test
  126. simp38, an R code which estimates an integral using Simpson's 3/8 quadrature rule.
  127. simp38_test
  128. solvematrix, an R code which solves a linear system by transforming it to Reduced Row Echelon Form (RREF).
  129. solvematrix_test
  130. stiff_ode, an R code which considers an ordinary differential equation (ODE) which is an example of a stiff ODE.
  131. stiff_ode_test
  132. symdiff, an R code which applies the symmetric finite difference formula to a function.
  133. symdiff_test
  134. tester, a BASH script which runs the test programs.
  135. timestamp, an R code which prints the current YMDHMS date as a timestamp.
  136. timestamp_test
  137. trapezoid, an R code which estimates an integral using the trapezoid quadrature rule.
  138. trapezoid_test
  139. 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.
  140. trapezoidal_test
  141. 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.
  142. trapezoidal_fixed_test
  143. tridiagmatrix, an R code which solves a linear system with a tridiagonal matrix.
  144. tridiagmatrix_test
  145. tspsa, an R code which solves the traveling salesperson problem using simulated annealing.
  146. tspsa_test
  147. vecnorm, an R code which computes the L2 norm of a vector.
  148. vecnorm_test
  149. wave, an R code which solves the 1D wave equation using the finite difference method.
  150. wave_test
  151. xls_io, R codes which illustrate how the Microsoft EXCEL program can share data with R.
  152. zero_brent, an R code which finds a zero of a scalar function of a scalar variable, by Richard Brent.
  153. zero_brent_test


Last revised on 12 June 2021.