Package 'kidsides'

Title: Download, Cache, and Connect to 'KidSIDES'
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>.
Authors: Nicholas Giangreco [aut, cph, cre]
Maintainer: Nicholas Giangreco <[email protected]>
License: CC BY 4.0
Version: 0.5.0
Built: 2025-03-04 05:19:56 UTC
Source: https://github.com/ngiangre/kidsides

Help Index


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 download.file

quiet

Whether to download quietly. See download.file

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()