Saturday, January 12, 2013

Introduction to R – Matrix Operations

Operations can be done on matrices in two fashions:
  • Element-wise : where operations performed on corresponding elements in the matrices. Just use the desired operator.
RGui (64-bit)_2013-01-09_13-41-07
  • Matrix-wise: where operations are performed on the whole matrices in the way you used to do in math. Use the desired operator between a couple of % %
RGui (64-bit)_2013-01-09_13-44-44

Stay tuned for more R notes.