Useful tricks for matrix manipulation

Installation

matricks is available on CRAN, so you can install it using simply:

install.packages('matricks')

If you rather want to install dev version, you can do it with devtools.

devtools::install_github('krzjoa/matricks')

Usage

Main matricks functions are m and v, which provide convenient API to create matrices and vectors.
Why should we write:

if we can simply create such a matrix like that:

v function is an useful shortcut for creating vertical vectors (single columns)

Setting values in easier with matricks