Skip to contents

Returns the platform-appropriate default folder for the duckdb database compiled by compileDatabase.

Usage

defaultDbPath(folder = "IMR_biotic_BES_database", root = "Fiskwise_data")

Arguments

folder

Character string giving the name of the database folder. Defaults to "IMR_biotic_BES_database".

root

Character string giving the shared data folder inside the user's home directory that holds folder. Defaults to "Fiskwise_data", the folder in which Fiskwise keeps all its local databases. Use NULL or "" to place folder directly in the home directory (the layout used before BioticExplorerServer 0.8.14).

Value

Character string giving an absolute path to the default database folder. The folder is not created.

Details

On macOS and Linux the default is ~/Fiskwise_data/IMR_biotic_BES_database. On Windows, R expands ~ through the "personal"/Documents special folder, which OneDrive's Known Folder Move frequently redirects into a synchronized OneDrive - <Organization>\Documents folder. A multi-gigabyte DuckDB file does not belong in a cloud-synchronized folder, so the default resolves to %USERPROFILE%\Fiskwise_data\IMR_biotic_BES_database on Windows. If USERPROFILE is not set, the function falls back to ~ expansion.

AI assistance

Written with Claude Opus 5.5 (Anthropic); reviewed in full by Claude Opus 5.5 (Anthropic), 2026-11-20.

See also

dbPathCandidates and findDatabase for locating a database installed to one of the earlier default locations.

Author

Mikko Vihtakari (Institute of Marine Research)

Examples

defaultDbPath()
#> [1] "/home/runner/Fiskwise_data/IMR_biotic_BES_database"
defaultDbPath(root = NULL)
#> [1] "/home/runner/IMR_biotic_BES_database"