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.
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
Creating the miniCRAN repository
In order to create the miniCRAN repository, please use the
create_minicran(minicran_path = "path_where_the_miniCRAN_directory_will_be", r_version = "3.5")
function found in
/bin/create_minicran.R. The current R version in the secured
area is 3.5. The resulting minicran directory is supposed to be zipped.
The transfer directory is
you find the zipped file in
The zip file should go in
If at some point the transfer does not work properly, try splitting up the zip
files to chunks of
variableMetadataPreparation is to be installed in the library
supposed to be stored in
Checking the package and creating binaries on windows
rhub::check(platform="windows-x86_64-oldrel", email = "insertyouremail").
You'll get an email where the windows binary of the build process is at.
Transfer the file just like you did with
miniCRAN and store it
R session at
Q://Variablenexport/variableMetadataPreparation, adjust the verison of
variableMetadataPreparation in the file
run the command
You're good to go.
Please file an issue in our issue tracker