Learn R Programming

OralOpioids (version 2.0.5)

load_Opioid_Table: Obtain the latest Opioid data

Description

load_Opioid_Table compares the date of the local Opioid_Table and compares it with the latest date of data. In case the local file is outdated, an updated file will be generated.

Usage

load_Opioid_Table(
  filelocation = "",
  no_download = FALSE,
  verbose = TRUE,
  country = "ca"
)

Value

The function returns the Opioid_Table as a data.frame. Comments on the data.frame include a status message (msg), the Opioid_Table save path (path), a disclaimer, and the source for the retrieved data (source_url_data and source_url_dosing).

Arguments

filelocation

String. The directory on your system where you want the dataset to be downloaded. If "", filelocation will be set to the download path within the OralOpioids package installation directory.

no_download

Logical. If set to TRUE, no downloads will be executed and no user input is required. Default: FALSE.

verbose

Logical. Indicates whether messages will be printed in the console. Default: TRUE.

country

String. Either "ca" (Canada), or "usa" (USA). Default: "ca".

Examples

Run this code
  FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country = "usa")
  head(FDA_Opioid_Table)

Run the code above in your browser using DataLab