Learn R Programming

matlib (version 1.0.0)

Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics

Description

A collection of matrix functions for teaching and learning matrix linear algebra as used in multivariate statistical methods. These functions are mainly for tutorial purposes in learning matrix algebra ideas using R. In some cases, functions are provided for concepts available elsewhere in R, but where the function call or name is not obvious. In other cases, functions are provided to show or demonstrate an algorithm. In addition, a collection of functions are provided for drawing vector diagrams in 2D and 3D.

Copy Link

Version

Install

install.packages('matlib')

Monthly Downloads

5,615

Version

1.0.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

October 2nd, 2024

Functions in matlib (1.0.0)

arc

Draw an arc showing the angle between vectors
arrows3d

Draw 3D arrows
cholesky

Cholesky Square Root of a Matrix
buildTmat

Build/Get transformation matrices
class

Class Data Set
cofactor

Cofactor of A[i,j]
Solve

Solve and Display Solutions for Systems of Linear Simultaneous Equations
getYmult

Correct for aspect and coordinate ratio
gsorth

Gram-Schmidt Orthogonalization of a Matrix
R

Rank of a Matrix
cone3d

Draw a 3D cone
corner

Draw a corner showing the angle between two vectors
circle3d

Draw a horizontal circle
circle

Draw circles on an existing plot.
angle

Angle between two vectors
echelon

Echelon Form of a Matrix
is_square_matrix

Test for square matrix
gaussianElimination

Gaussian Elimination
minor

Minor of A[i,j]
latexMatrixOperations

Various Functions and Operators for "latexMatrix" Objects
plotEqn

Plot Linear Equations
plot.regvec3d

Plot method for regvec3d objects
len

Length of a Vector or Column Lengths of a Matrix
matrix2latex

(Deprecated) Convert matrix to LaTeX equation
matlib-package

matlib: Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics.
mpower

Matrix Power
rowadd

Elementary Row Operations
rowCofactors

Row Cofactors of A[i,]
tr

Trace of a Matrix
powerMethod

Power Method for Eigenvectors
therapy

Therapy Data
printMatEqn

Print Matrices or Matrix Operations Side by Side
rowmult

Multiply Rows by Constants
svdDemo

Demonstrate the SVD for a 3 x 3 matrix
showEqn

Show Matrices (A, b) as Linear Equations
symMat

Create a Symmetric Matrix from a Vector
swp

The Matrix Sweep Operator
vandermode

Vandermode Matrix
workers

Workers Data
xprod

Generalized Vector Cross Product
rowMinors

Row Minors of A[i,]
vec

Vectorize a Matrix
vectors3d

Draw 3D vectors
vectors

Draw geometric vectors in 2D
latexMatrix

Create and Manipulate LaTeX Representations of Matrices
regvec3d

Vector space representation of a two-variable regression model
printMatrix

(Deprecated) Print a matrix, allowing fractions or LaTeX output
plotEqn3d

Plot Linear Equations in 3D
rowswap

Interchange two rows of a matrix
showEig

Show the eigenvectors associated with a covariance matrix
pointOnLine

Position of a point along a line
MoorePenrose

Moore-Penrose inverse of a matrix
Eqn

Create a LaTeX Equation Wrapper
Inverse

Inverse of a Matrix
Det

Determinant of a Square Matrix
Eigen

Eigen Decomposition of a Square Symmetric Matrix
GramSchmidt

Gram-Schmidt Orthogonalization of a Matrix
LU

LU Decomposition
Proj

Projection of Vector y on columns of X
J

Create a vector, matrix or array of constants
Ginv

Generalized Inverse of a Matrix
QR

QR Decomposition by Graham-Schmidt Orthonormalization
SVD

Singular Value Decomposition of a Matrix
adjoint

Calculate the Adjoint of a matrix