faster version, subset problem fix
Hello,
Here is the new faster version containing fixes to the following issues:
-
Issue #4 (closed) : now all functions have the
source()
paths outside thefunction {}
. -
Issue #5 (closed) and #6 (closed):
subset()
has been replaced withdplyr::filter()
in the what is now linesnew_merge_ids_year.R#L572
andfind_gap_func.R#L50
... For more information see issue #5 (closed) -
Some of the line numbers from
new_merge_ids_year.R
andfind_gap_func.R
have changed since I formatted the code a little bit for an easier reading. I have added some white spaces so when you compare with old version, click the option Hide whitespace changes for an easier comparison. -
As requested by liz (@eck), I changed
args
tomy_args
to avoid confusion with the R function nameargs
.
The code has been tested for the entire 1970, improving running time from 12.09 hrs to just under 9.48hrs.
New code and new IMMA
Max Memory : 28018 MB Average Memory : 23058.03 MB
Old code and old IMMA
Max Memory : 29121 MB Average Memory : 24346.53 MB
The code has also been tested with the new IMMA Version: 0.0.2 and old version. There are no significant time differences between versions but is possible that this is different for other years.
Also, the data output has been compared between this version and the original tag version from Liz, and all the elements of the data frames compared are equal (MFILES_SHIP_FINAL/1970_1.Rda identical to MFILES_SHIP_FINAL/1970_1.Rda new version) for all the months in that year.