knitr::opts_chunk$set( collapse = TRUE, eval = FALSE, echo = TRUE, comment = "#>" )
The FORCIS database is regularly updated. The global structure of the csv
files doesn't change between versions but some bugs can be fixed and new records can also be added. This is why it is recommended to use the latest version of the database.
The package forcis
is designed to handle the versioning of the database on Zenodo and will inform users if a new version is available each time they use one of the read_*_data()
functions. The following message will be displayed:
A newer version of the FORCIS database is available. Use 'download_forcis_db(version = NULL)' to download it.
As mentioned in this message, users can choose whether to download the latest version of the database.
A good practice to ensure that the user works with the latest version of the database might be to add this line at the beginning of the script:
download_forcis_db(version = NULL, ...)
By setting version = NULL
, the function download_forcis_db()
will download the latest version of the FORCIS database from Zenodo (if not already downloaded). If no newer version has been released on Zenodo and if the latest version of the database has already been downloaded, this step will be ignored.
Note that the FORCIS database is saved in forcis-db/version-99/
, where 99
is the label of the version. If you regularly download the new versions, the content of the folder forcis-db/
may grow over time and it can be interesting to manually delete the folder of the previous versions.
If for some reason users want to freeze the version they use, it is possible to disable this message by setting the argument check_for_update
to FALSE
in the read_*_data()
functions.
It is also possible to disable this message globally for the current session:
options(check_for_update = FALSE)
The package forcis
"knows" which version of the database you used last time. A hidden file named .forcis
is created (or updated) each time the function download_forcis_db()
or read_*_data()
is called. This hidden file contains one line:
FORCIS_VERSION=99
Note that this hidden file is used by some functions of the forcis
package. Users don't need to edit it manually.
If you want to be sure to use a specific version of the database, you can use the argument version
of the read_*_data()
functions, or use the following line:
options(forcis_version = "99")
At any time, user can run the function get_current_version()
to check the version of the database currently in use.
But again, it is recommended to use the latest version of the database.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.