You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you well know, data.table also has a dcast function. There is one option that it is very helpful:
sep | Character vector of length 1, indicating the separating character in variable names generated during casting. Default is _ for backwards compatibility.
Is there a way to do the same thing with reshape2::dcast? I really like reshape2 and that option for dcast would be really useful.
The text was updated successfully, but these errors were encountered:
Not a direct answer but for information, know that tidyr is replacing reshape2 and is part of the tidyverse. See tidyr's README
tidyr replaces reshape2 (2010-2014) and reshape (2005-2010). Somewhat counterintuitively each iteration of the package has done less. tidyr is designed specifically for tidying data, not general reshaping (reshape2), or the general aggregation (reshape).
I point to this because the tidyr 📦 has a spread function that act like dcast and have a sep argument to do what you are look for. See tidyr reference about spread
As you well know,
data.table
also has adcast
function. There is one option that it is very helpful:Is there a way to do the same thing with
reshape2::dcast
? I really likereshape2
and that option fordcast
would be really useful.The text was updated successfully, but these errors were encountered: