Learn R Programming

ramify (version 0.2.0)

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.

Arguments

Details

The main functions in this package are:
  • mat- matrix wrapper function
  • bmat- like the character method ofmat, but for block matrices
  • dmat- likemat, but returns a data frame instead
  • argmax/argmin- find the position of the max/min in each row or column of a matrix
  • eye- construct an identity matrix
  • hcat/vcat- concatenate matrices
  • fill- fill a matrix or array with a particular value
  • flatten- flatten (i.e., collapse) a matrix or array to one dimension
  • inv- calculate the inverse of a square matrix
  • linspace/logspace- construct a vector of linearly- spaced/logarithmically-spaced elements
  • ones/zeros- construct a matrix or array of all ones/zeros
  • rand/randi/randn- construct a matrix or array of uniformly/normally distributed random numbers
  • resize- change the size and shape of a given matrix or array
  • size- extract the dimensions of a matrix or array.
  • trues/falses- construct a matrix or array of allTRUEs/FALSEs