shcaba / SS-DL-tool

Stock Synthesis Data-limited tool
34 stars 16 forks source link

Make into an R package? #78

Open k-doering-NOAA opened 6 months ago

k-doering-NOAA commented 6 months ago

The readme provides helpful instructions for dependencies!

I wonder if the the stock assessment continuum tool should be reformatted as an R package to make installation easier? That would allow putting all the dependencies in the DESCRIPTION file. Then, users could use remotes::install_github() to install both dependencies and the shiny application. The shiny app could also be distributed in a pre-compiled format using r universe.

Here are some instructions on making a shiny app into an R package

shcaba commented 6 months ago

I would love to do that. I have very limited R package creation skills, so would need some pointers. I can take a look at the link you sent. Given the tool relies on delivering Stock Synthesis executables to the user, does this complicate it becoming a package?

iantaylor-NOAA commented 6 months ago

An R package version (or even the current configuration), could use r4ss::get_ss3_exe() (developed by @e-perl-NOAA) to install the SS3 executable. That approach has the benefit of only installing the executable required by the user's operating system. It could either specify a particular version or get the most recent release.

k-doering-NOAA commented 6 months ago

Thanks @iantaylor-NOAA for providing the most elegant solution!

An approach SSMSE and ss3sim have followed is putting the executables in the inst/bin folder (example). This is not allowed on CRAN, but is fine for a package on GitHub or distributed via R universe.