Define a matrix in R in a similar fashon as with Numpy
I love the fact that using numpy in Python it is very easy to define a matrix/array in a way that is very close to the mathematical definition.
Does R have a similar way of achieving this result?
R: define a matrix in a similar fashon as with Numpy
Please have a look at the snipped below. My python is seasoned and very rusty, but I remembered how I loved the fact that it is very easy to define a matrix/array in a way which is very close to the mathematical definition.
Does anybody know if it is possible to achieve the same in R?
No intention to start any language war here.
Thanks for any suggestions.