Create a separate function within {r4ss} to merge the csv files outside of r4ss::SS_html() that can be called by {sa4ss}.
An alternative would be to have r4ss::SS_plots() overwrite lines in the existing csv file associated with the files that are getting overwritten. I don't want to just wipe out the csv file with each new call to that function because I'd like to maintain the option to create different subsets of the plots with multiple calls to r4ss::SS_plots() (e.g. to change the plot dimensions for some that need to be taller or wider).
Note
This may be more of an {r4ss} issue than a {sa4ss} one, but my priority is satisfying the needs of {sa4ss} developers and users, so posting here.
Problem
{r4ss} writes the plotInfoTable csv files for each run which get combined/merged by
r4ss::SS_html()
. However, {sa4ss} skips the html step so requires a redundant merging of the files in https://github.com/nwfsc-assess/sa4ss/blob/master/R/get_plotinfo.R.There have been problems with these files related to the time stamp on the png files, I think when the files were manually edited (where here I commented out the line that applies
as.POSIXlt()
: https://github.com/r4ss/r4ss/commit/e41135b0367bec2ca9ddf9812492bd27865920d2.There's also this stale branch from 2020 with what looks like some new useful checks in the csv file merging process: https://github.com/r4ss/r4ss/compare/main...html
Proposal
Create a separate function within {r4ss} to merge the csv files outside of
r4ss::SS_html()
that can be called by {sa4ss}.An alternative would be to have
r4ss::SS_plots()
overwrite lines in the existing csv file associated with the files that are getting overwritten. I don't want to just wipe out the csv file with each new call to that function because I'd like to maintain the option to create different subsets of the plots with multiple calls tor4ss::SS_plots()
(e.g. to change the plot dimensions for some that need to be taller or wider).