R package matrixkit
R
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
man
vignettes
.Rbuildignore
DESCRIPTION
NAMESPACE
README.md

README.md

"matrixkit"

matrixkit is an R package that provides a first aid kit for some matrix operations commonly used in multivariate data analysis methods.

Motivation

I developed matrixkit as part of a major project to develop a set of tools for multiblock methods. The main idea behind matrixkit is to have a set of functions that are frequently used in several multivariate methods. For instance, calculate the (euclidean) norm of a vector, the trace of a square matrix, a Projector (aka hat matrix) matrix, obtain a binary matrix from a given factor etc.

Installation

Stable version NOT on CRAN yet:

# stable version (not yet)
install.packages('matrixkit')

Development version on github:

library(devtools)
install_github('matrixkit', 'gastonstat')

Some examples

library(matrixkit)

# create a vector 
v = c(1, 1, 1, 1)

# vector norm
vnorm(v)

# create a square matrix
set.seed(10)
X = matrix(runif(25), 5, 5)

# trace of X
tr(X)

# lower triangular part
lower_triangular(X)

# upper triangular part
upper_triangular(X)

# create a matrix
set.seed(5)
M = matrix(runif(15), 5, 3)

# projector matrix
projector(M)

Author Contact

www.gastonsanchez.com

Gaston Sanchez (gaston.stat at gmail.com)