When are matrices a useful data structure?

It seems like it is almost always easier to work with a data.frame/tibble than a matrice.

If the matrix is not super big, it's easier just to pivot it longer, and then do whatever manipulation that you need with tidyverse functions, and then convert it back to a matrix if you need the output in a tiff format.

What do other people think? What are the situations where matrices are a more useful structure?

Can you provide any examples where it is easier to convert a matrix to a data frame, do something to it, then convert it back to a matrix?

If you struggle with the syntax of applying functions to matrices, then I can understand that you might adopt this method, but matrix calculations should be more efficient and concise than converting back and forth.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.