CRAN Status Badge Cran Checks Dependencies R CMD Check via {tic} linting test-coverage codecov

The R package DIZtools provides utility functions used for the R package development infrastructure inside the data integration centers (‘DIZ’) to standardize and facilitate repetitive tasks such as setting up a database connection or issuing notification messages and to avoid redundancy.

:bulb: DIZtools contains all “lightweighted” functions of DIZutils making it a lot quicker to install, while DIZutils has a lot of dependencies and system requirements.


You can install DIZtools directly from CRAN:


The development version can be installed using

remotes::install_github("miracum/misc-diztools", ref = "dev")


In order to set up a database connection using the function DIZutils::db_connection, one needs to provide the required connection settings via environment variables. To facilitate the process of making such environment variables available within the current R session, the function DIZtools::setenv_file works as a wrapper function around the base R method Sys.setenv. It takes the file name of a text file with the definitions of the environment variables as input, and sets those environment variables within the current R session.


The design of the envfile is based on the .env file for defining environment variables when using docker-compose commands. See here (currently, neither empty lines nor the using of comments (‘#’) is being supported by DIZtools::setenv_file).

To create an envfile for connecting with an i2b2 database, the following exemplary definitions of environment variables should be written to a simple textfile, e.g. named envfile, which can then be passed as argument to DIZtools::setenv_file.


More Infos