This function loads the ggfigdone database from the disk.

fd_load(dir, auto_database_upgrade = TRUE, set_default = TRUE)

Arguments

dir

A character string representing the directory path.

auto_database_upgrade

A logical value. If TRUE, the function will automatically upgrade the database to the latest version. If FALSE, you need to manually save the data using the fd_save function.

set_default

A logical value. If TRUE, the function will set the database as the default database.

Value

An object of class fdObj.

Examples

library(ggplot2)
## create ggfigdone database in a temporary directory
db_dir = file.path(tempdir(), "fd_load")
fd_init(db_dir, rm_exist = TRUE)
#> The database version is up-to-date.
#> ##########
#> ## ggfigdone database: /tmp/RtmpG9xoyp/fd_load
#> ## Number of figures: 0
#> ## Last updated date: 2024-08-16 14:28:39.259767

## Load the ggfigdone database
fd_load(db_dir)
#> The database version is up-to-date.
#> ##########
#> ## ggfigdone database: /tmp/RtmpG9xoyp/fd_load
#> ## Number of figures: 0
#> ## Last updated date: 2024-08-16 14:28:39.285682