Learn R Programming

⚠️There's a newer version (1.0.0) of this package.Take me there.

matlib (version 0.9.8)

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

8,233

Version

0.9.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

July 25th, 2024

Functions in matlib (0.9.8)

arrows3d

Draw 3D arrows
cholesky

Cholesky Square Root of a Matrix
SVD

Singular Value Decomposition of a Matrix
Solve

Solve and Display Solutions for Systems of Linear Simultaneous Equations
arc

Draw an arc showing the angle between vectors
angle

Angle between two vectors
R

Rank of a Matrix
circle

Draw circles on an existing plot.
adjoint

Calculate the Adjoint of a matrix
buildTmat

Build/Get transformation matrices
gsorth

Gram-Schmidt Orthogonalization of a Matrix
cone3d

Draw a 3D cone
cofactor

Cofactor of A[i,j]
is_square_matrix

Test for square matrix
circle3d

Draw a horizontal circle
len

Length of a Vector or Column Lengths of a Matrix
mpower

Matrix Power
matlib-package

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

Plot method for regvec3d objects
gaussianElimination

Gaussian Elimination
getYmult

Correct for aspect and coordinate ratio
matrix2latex

Convert matrix to LaTeX equation
corner

Draw a corner showing the angle between two vectors
minor

Minor of A[i,j]
echelon

Echelon Form of a Matrix
class

Class Data Set
rowMinors

Row Minors of A[i,]
rowadd

Add multiples of rows to other rows
showEig

Show the eigenvectors associated with a covariance matrix
showEqn

Show Matrices (A, b) as Linear Equations
symMat

Create a Symmetric Matrix from a Vector
powerMethod

Power Method for Eigenvectors
pointOnLine

Position of a point along a line
printMatEqn

Print Matrices or Matrix Operations Side by Side
workers

Workers Data
printMatrix

Print a matrix, allowing fractions or LaTeX output
vectors3d

Draw 3D vectors
vandermode

Vandermode Matrix
tr

Trace of a Matrix
vec

Vectorize a Matrix
xprod

Generalized Vector Cross Product
rowmult

Multiply Rows by Constants
rowswap

Interchange two rows of a matrix
plotEqn3d

Plot Linear Equations in 3D
regvec3d

Vector space representation of a two-variable regression model
plotEqn

Plot Linear Equations
therapy

Therapy Data
rowCofactors

Row Cofactors of A[i,]
vectors

Draw geometric vectors in 2D
swp

The Matrix Sweep Operator
svdDemo

Demonstrate the SVD for a 3 x 3 matrix
Ginv

Generalized Inverse of a Matrix
MoorePenrose

Moore-Penrose 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
J

Create a vector, matrix or array of constants
Proj

Projection of Vector y on columns of X
LU

LU Decomposition
Inverse

Inverse of a Matrix
QR

QR Decomposition by Graham-Schmidt Orthonormalization