Custom matrix operators in R
Background I want to write a package overloading +, -, %% on matrices, to make it easier to use R for the quick matrix calculations one might do in Matlab: +X computes t(X) (binary X+Y works as normal) -X computes solve(X) (binary X-Y works as normal) -I(X) computes -X X%%Y computes Y%*%X (write multiplications right-to-left, […]
Custom matrix operators in R
Background I want to write a package overloading +, -, %% on matrices, to make it easier to use R for the quick matrix calculations one might do in Matlab: +X computes t(X) (binary X+Y works as normal) -X computes solve(X) (binary X-Y works as normal) -I(X) computes -X X%%Y computes Y%*%X (write multiplications right-to-left, […]