Helper Files for the CTN-0094 Relational Database

Engineered features and "helper" functions ancillary to the 'public.ctn0094data' package, extending this package for ease of use (see < https://CRAN.R-project.org/package=public.ctn0094data>). This 'public.ctn0094data' package contains harmonized datasets from some of the National Institute of Drug Abuse's Clinical Trials Network (NIDA's CTN) projects. Specifically, the CTN-0094 project is to harmonize and de-identify clinical trials data from the CTN-0027, CTN-0030, and CTN-51 studies for opioid use disorder. This current version is built from 'public.ctn0094data' v. 1.0.6.


public.ctn0094extra

Introduction

These are helper functions for the CTN-0094 data package public.ctn0094data and supplemental engineered / derived data sets.

Installing Dependencies

Because this is the "Extra" package which supplements the information in the primary public.ctn0094data:: package, we must have the most recent version of this primary data package built first. This package is on CRAN at https://CRAN.R-project.org/package=public.ctn0094data, so you can install this data package with:

install.packages("public.ctn0094data")

If you have access to the GitHub repository for the development version of this data package, use the remotes package to install the data package from GitHub:

remotes::install_github('https://github.com/CTN-0094/public.ctn0094data')

To build this package from "zipped" source file on your local machine, run the following code (make sure to set the correct version and the path for your machine):

install.packages(
  '/Users/gabrielodom/Desktop/public.ctn0094data_0.9.0.tar.gz',
  repos = NULL,
  type = 'source'
)

Installing this Package

Once you have the public.ctn0094data package downloaded and installed on your computer, you can install this package. For now, use the remotes package to install this package directly from GitHub via

remotes::install_github('https://github.com/CTN-0094/public.ctn0094extra')

Once public.ctn0094data and public.ctn0094extra have been released on CRAN, you will be able to install this package with:

# Do not run yet
# install.packages("public.ctn0094extra")

Workflow

In order to recreate the data sets in this package, first build this package (public.ctn0094extra::) and then run the following scripts in order, rebuilding the package and restarting your R session after each script:

  1. inst/scripts/create_inductDelay_20220308.R
  2. inst/scripts/create_visitImputed_20220308.R
  3. inst/scripts/create_weeklyOpioidPattern_20220308.R
  4. inst/scripts/create_weeklyTLFBPattern_20220511.R
  5. inst/scripts/create_raceEthnicity_20220816.R

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("public.ctn0094extra")

1.0.4 by Gabriel Odom, 3 years ago


https://ctn-0094.github.io/public.ctn0094extra/


Report a bug at https://github.com/CTN-0094/public.ctn0094extra/issues


Browse source code at https://github.com/cran/public.ctn0094extra


Authors: Gabriel Odom [aut, cre] , Raymond Balise [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, magrittr, purrr, tibble, tidyr, utils

Depends on public.ctn0094data

Suggests knitr, kableExtra, rmarkdown, scales, stringr


See at CRAN