4 ms·
There's an important difference between matlab and R: in matlab matrices & arrays are the most important data structure, while in R data frames are the most imp
by hadley 14y ago
There's an important difference between matlab and R: in matlab matrices & arrays are the most important data structure, while in R data frames are the most important. There is no "array language" underlying R - working with arrays and matrices in R is usually painful, and your life is much easier if you stick with data frames. (This is something that could be fixed in R by a package, but no one has done so yet)
- pseut 14y ago> This is something that could be fixed in R by a package, but no one has done so yet I'm curious about about what you mean by this. How would a single package fix that? And does "fix" mean to make matrices easier or to make dataframes more broadly effective?
- hadley 14y agoThe problem isn't with the underlying data structures, it's with the methods that have been implemented for them. A package would fix the problem by fleshing out r with a decent set of consistently named and parameterised matrix manipulation functions.
- mbq 14y agoI don't agree; the core of array paradigm is vectorisation, as started in APL and continuing in Fortran, J, K, lush or R. The idea that it has something to do with matrix algebra is wrong -- MATrix LABoratory is simply an orthogonal story.
- hadley 14y agoHuh? I don't understand your point, e.g. I didn't mention matrix algebra.