Title: | Download, Cache, and Connect to KidSIDES |
Version: | 0.5.0 |
Maintainer: | Nicholas Giangreco <nick.giangreco@gmail.com> |
Description: | Caches and then connects to a 'sqlite' database containing half a million pediatric drug safety signals. The database is part of a family of resources catalogued at https://nsides.io. The database contains 17 tables where the description table provides a map between the fields the field's details. The database was created by Nicholas Giangreco during his PhD thesis which you can read in Giangreco (2022) <doi:10.7916/d8-5d9b-6738>. The observations are from the Food and Drug Administration's Adverse Event Reporting System. Generalized additive models estimated drug effects across child development stages for the occurrence of an adverse event when exposed to a drug compared to other drugs. Read more at the methods detailed in Giangreco (2022) <doi:10.1016/j.medj.2022.06.001>. |
License: | CC BY 4.0 |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | DBI, RSQLite, R.utils, tools |
Suggests: | ggplot2, dbplyr, tidyr, stringr, ggthemes, rlang, ggrepel, scales, pacman, dplyr, rmarkdown, knitr, covr, testthat (≥ 3.0.0), DT, gt, lobstr, prettyunits, purrr, tidyverse |
URL: | https://github.com/ngiangre/kidsides, https://ngiangre.github.io/kidsides/, https://nsides.io |
VignetteBuilder: | knitr |
Depends: | R (≥ 4.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-05-20 19:06:02 UTC; nickgiangreco |
Author: | Nicholas Giangreco
|
Repository: | CRAN |
Date/Publication: | 2023-05-21 07:20:02 UTC |
Connect to the Pediatric Drug Safety database
Description
Establish a sqlite connection from the downloaded database.
Usage
connect_sqlite_db()
Value
SQLite connection
Examples
if(FALSE){
download_sqlite_db()
con <- connect_sqlite_db()
disconnect_sqlite_db(con)
}
Disconnect from the Pediatric Drug Safety database
Description
Disconnect the sqlite database connection.
Usage
disconnect_sqlite_db(con)
Arguments
con |
The sqlite connection |
Value
TRUE, invisibly
Examples
if(FALSE){
download_sqlite_db()
con <- connect_sqlite_db()
disconnect_sqlite_db(con)
}
Download the Pediatric Drug Safety database
Description
Download the database published in Giangreco et al. 2022. This function will prompt to download the database, so the cache directory will be identified and the database will be downloaded to it only after consent. Warning, the size of the uncompressed 'sqlite' file is close to 0.9GB or 900 MB. Use with caution.
Usage
download_sqlite_db(
method = "auto",
quiet = FALSE,
timeout = 1000,
force = FALSE
)
Arguments
method |
The method to download the sqlite database. See |
quiet |
Whether to download quietly. See |
timeout |
Extended download session for downloading this file. Default is 1000 seconds. |
force |
Whether to force the download of the database. Defaults to FALSE. Needs to be TRUE for database to download. The function will prompt for confirmation. |
Value
TRUE, invisibly
Examples
if(FALSE){
download_sqlite_db() #set force=TRUE if desired to download 0.9GB file to machine
}
Return database cache
Description
This function returns the URL, sqlite database file, and cache names to be used for downloading the database to your machine.
Usage
get_db_path()
Value
list
Examples
get_db_path()