I have a flexdashboard which queries from a local DuckDB (similar to SQLite) but every so often it says:
Warning: Error in initialize: duckdb_startup_R: Failed to open database
There is no "onStop dbdisconnect" style command in my code (I'm not sure where to put it in flexdashboard) so it doesn't shut down correctly if my R instance crashes. My only solution is to restart the computer. How can I fix this?