Learn R Programming

boilerplate (version 1.3.0)

boilerplate_update_bibliography: Update Bibliography from Remote Source

Description

Downloads and caches a bibliography file from a remote URL specified in the database.

Usage

boilerplate_update_bibliography(
  db,
  cache_dir = NULL,
  force = FALSE,
  quiet = FALSE
)

Value

Path to the local bibliography file, or NULL if no bibliography specified

Arguments

db

Database object containing bibliography information

cache_dir

Directory to cache the bibliography file. Default uses tools::R_user_dir("boilerplate", "cache")

force

Logical. Force re-download even if cached file exists

quiet

Logical. Suppress messages

Examples

Run this code
# \donttest{
# Create temporary directory for example
temp_dir <- tempfile()
dir.create(temp_dir)

# Initialise and import
boilerplate_init(data_path = temp_dir, create_dirs = TRUE, confirm = FALSE, quiet = TRUE)
db <- boilerplate_import(data_path = temp_dir, quiet = TRUE)

# Update bibliography
bib_file <- boilerplate_update_bibliography(db)

# Clean up
unlink(temp_dir, recursive = TRUE)
# }

Run the code above in your browser using DataLab