Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review use of reshape2 package vs tidyr #78

Open
spencerpease opened this issue Apr 3, 2019 · 1 comment
Open

Review use of reshape2 package vs tidyr #78

spencerpease opened this issue Apr 3, 2019 · 1 comment
Labels
refactor Make the code base cleaner with minimal change to functionality

Comments

@spencerpease
Copy link
Contributor

The reshape2 package has been succeeded by the tidyr package as the "tidyverse" standard for tidying data. From the tidyr website:

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).

We should check if our usage of reshape2 can be replaced with tidyr functions, since that is what our more recent functions make use of.

Rstudio has a neat "Find in Files" command (CMD/Ctrl + Shift + F) for searching packages that could be useful here.

@spencerpease spencerpease added the refactor Make the code base cleaner with minimal change to functionality label Apr 3, 2019
@jonathancallahan
Copy link
Member

From: https://rpubs.com/sterding/Reshape2_and_Tidyr

method wide->long long->wide
reshape2 melt cast
tidyr gather spread
spreadsheet unpiovt pivot
database fold unfold

@jonathancallahan jonathancallahan added this to the PWFSLSmoke 1.3 milestone Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Make the code base cleaner with minimal change to functionality
Projects
None yet
Development

No branches or pull requests

2 participants