PIFSCstockassessments / TMB.LBSPR

Implementation of GTG LBSPR model using TMB
Other
0 stars 0 forks source link

Function name ambiguity with data.table and reshape2 : melt and dcast #8

Closed efletcherPIFSC closed 5 years ago

efletcherPIFSC commented 5 years ago

Importing data.table and reshape2 have conflicts. In short, both packages have the function named melt and dcast.

checking whether package 'TMB.LBSPR' can be installed ... WARNING
Found the following significant warnings:
  Warning: replacing previous import 'data.table::melt' by 'reshape2::melt' when loading 'TMB.LBSPR'
  Warning: replacing previous import 'data.table::dcast' by 'reshape2::dcast' when loading 'TMB.LBSPR'
See '[READACTED]/00install.out' for details.

Currently, process_outputs is the only R script/function that imports both data.table and reshape2. Other R scripts in this Package do not import/reference reshape2. Glancing over process_outputs, no reshape2 functions used in the code.

marcnadon commented 5 years ago

I use melt and dcast from reshape2. I wasn't aware that data.table had similarly named functions... Can you simply replace these with reshape2::melt , etc.? I'm not exactly sure how these functions work in data.table and if the results would be the same....

efletcherPIFSC commented 5 years ago

I limited TMB.LBSPR which functions it can import from both the data.table and reshape2 packages. Clears R package checker.