Build Status Codecov test coverage Lifecycle: stable Documentation

This repository contains R code which extracts metadata for variables from STATA (dta) files for the MDM of the research data center of the dzhw. If you do not work for the research data center of the dzhw, this package will probably be only useful for learning purposes, as it is specifically designed to help with our internal processes. You find the workflow to use it here.

Development

Developers need to setup the R devtools on their machine.

install.packages("devtools", dependencies = TRUE)
devtools::install_github("dzhw/variableMetadataPreparation")

After setting up devtools you can install all required R packages with

R -e 'devtools::install_deps(dep = T)'

You can build the package on you local machine with

R CMD build .

Before pushing to Github (and thus kicking of CI) you should run

R CMD check *tar.gz --no-manual

Deployment

Copy build artifacts into “geschützter Bereich”

First you should clear the following directories:

  1. Q:\Variablenexport\variableMetadataPreparation\miniCRAN
  2. Q:\Variablenexport\variableMetadataPreparation\bin
  3. Q:\Variablenexport\variableMetadataPreparation\library

Github actions currently creates a bin-and-miniCRAN.zip. This archive needs to be extracted in the “geschützter Bereich” to Q:\Variablenexport\variableMetadataPreparation.

Installation

Run the R-script install_packages.R under Q:\Variablenexport\variableMetadataPreparation\bin

Rscript install_packages.R

The bin folder contains a template .bat (variablesToJson.bat.tmpl) which needs to be copied to and adjusted by every project.

Having trouble?

Please file an issue in our issue tracker