ramify: ramify: Additional MatrIx FunctionalitY
Description
Additional MatrIx FunctionalitY for R including: (1) wrappers
for the base matrix function that allows matrices to be created from
character strings and lists (the former is especially useful for creating
block matrices), (ii) better default printing of large matrices, and (iii) a
number of convenience functions for users more familiar with other scientific
languages like Julia, MATLAB/Octave, or Python.Details
The main functions in this package are:
mat
- matrix wrapper functionbmat
- like the character method ofmat
, but for
block matricesdmat
- likemat
, but returns a data frame insteadargmax
/argmin
- find the position of the max/min in
each row or column of a matrixeye
- construct an identity matrixhcat
/vcat
- concatenate matricesfill
- fill a matrix or array with a particular valueflatten
- flatten (i.e., collapse) a matrix or array to one
dimensioninv
- calculate the inverse of a square matrixlinspace
/logspace
- construct a vector of linearly-
spaced/logarithmically-spaced elementsones
/zeros
- construct a matrix or array of all
ones/zerosrand
/randi
/randn
- construct a matrix or array
of uniformly/normally distributed random numbersresize
- change the size and shape of a given matrix or
arraysize
- extract the dimensions of a matrix or array.trues
/falses
- construct a matrix or array of allTRUE
s/FALSE
s