Learn R Programming

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

matlib (version 0.9.5)

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

4,509

Version

0.9.5

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Friendly

Last Published

August 21st, 2021

Functions in matlib (0.9.5)

Det

Determinant of a Square Matrix
LU

LU Decomposition
Proj

Projection of Vector y on columns of X
Ginv

Generalized Inverse of a Matrix
Eigen

Eigen Decomposition of a Square Symmetric Matrix
Inverse

Inverse of a Matrix
MoorePenrose

Moore-Penrose inverse of a matrix
GramSchmidt

Gram-Schmidt Orthogonalization of a Matrix
QR

QR Decomposition by Graham-Schmidt Orthonormalization
J

Create a vector, matrix or array of constants
angle

Angle between two vectors
buildTmat

Build/Get transformation matrices
arrows3d

Draw 3D arrows
echelon

Echelon Form of a Matrix
cone3d

Draw a 3D cone
arc

Draw an arc showing the angle between vectors
corner

Draw a corner showing the angle between two vectors
R

Rank of a Matrix
gsorth

Gram-Schmidt Orthogonalization of a Matrix
SVD

Singular Value Decomposition of a Matrix
is_square_matrix

Test for square matrix
cholesky

Cholesky Square Root of a Matrix
gaussianElimination

Gaussian Elimination
class

Class Data Set
plotEqn

Plot Linear Equations
svdDemo

Demonstrate the SVD for a 3 x 3 matrix
plotEqn3d

Plot Linear Equations in 3D
Solve

Solve and Display Solutions for Systems of Linear Simultaneous Equations
len

Length of a Vector or Column Lengths of a Matrix
printMatEqn

Print Matrices or Matrix Operations Side by Side
circle3d

Draw a horizontal circle
matlib

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

Cofactor of A[i,j]
powerMethod

Power Method for Eigenvectors
pointOnLine

Position of a point along a line
showEig

Show the eigenvectors associated with a covariance matrix
vandermode

Vandermode Matrix
tr

Trace of a Matrix
swp

The Matrix Sweep Operator
adjoint

Calculate the Adjoint of a matrix
regvec3d

Vector space representation of a two-variable regression model
printMatrix

Print a matrix, allowing fractions or LaTeX output
mpower

Matrix Power
symMat

Create a Symmetric Matrix from a Vector
rowCofactors

Row Cofactors of A[i,]
matrix2latex

Convert matrix to LaTeX equation
rowMinors

Row Minors of A[i,]
minor

Minor of A[i,j]
showEqn

Show Matrices (A, b) as Linear Equations
plot.regvec3d

Plot method for regvec3d objects
rowadd

Add multiples of rows to other rows
therapy

Therapy Data
workers

Workers Data
vectors3d

Draw 3D vectors
xprod

Generalized Vector Cross Product
vectors

Draw geometric vectors in 2D
rowmult

Multiply Rows by Constants
rowswap

Interchange two rows of a matrix
vec

Vectorize a Matrix