This is similar to app(), except that it relies on the bslib package to provide a cleaner interface, in which sub-windows for controllers can be opened and closed by the user. Since bslib is still experimental, app2() may start failing in the future, and users are asked to report an issue on the package github page, so the author can make adjustments.

app2(debug = FALSE)

Arguments

debug

logical value indicating whether to print output to the R console as the computation is done.

Details

Compared with app(), the present function lacks the ability to save settings and reload them later. This is mainly because it only works with locally-run operations, not from server-run operations. The latter would require extra coding to set up user's storage space, to prevent against web attacks, etc., which is beyond the present purpose. However, there is an addition with app2() that might prove more useful: a button to display the code required to reproduce the simulated state. This may be of help to the those seeking to explore the results of simulations more precisely and with greater reproducibility.

Sliders, buttons, and choosers are grouped into panes that appear on the left of the view. When app2() first opens, all of these panes are closed. To get acquainted with the app, try adjusting the controllers that are visible on the initial view. Then, open the "ship" pane and increase the ship mass. Do you find that the results make qualitative sense? Continue this process, exploring all the panes. It is hoped that a half hour of such exploration will let users start to investigate practical applications. For more about how the simulations are carried out, as well as comments on some applications that may be of interest, please consult Kelley et al. (2021).

More information on app2() in video form on youtube.

References

Kelley, Dan E., James P. Vlasic, and Sean W. Brillant. "Assessing the Lethality of Ship Strikes on Whales Using Simple Biophysical Models." Marine Mammal Science, 37(1), 2021. doi:10.1111/mms.12745 .

See also

Other interactive apps: app()

Author

Dan Kelley