R

Casting a Wide (and Sparse) Matrix in R

FavoriteLoadingAdd to favorites

I routinely use melt() and cast() from the reshape2 package as part of my data munging workflow. Recently I’ve noticed that the data frames I’ve been casting are often extremely sparse. Stashing these in a dense data structure just feels wasteful. And the dismal drone of page thrashing is unpleasant. So I had a look around for an alternative. As…
Original post: Casting a Wide (and Sparse) Matrix in R
Source: R-bloggers