Skip to content
This tool extracts metadata of variables and creates JSON files for the mdm.
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
bin
docs
inst/extdata
man
output
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
LICENSE.md
NAMESPACE
README.md
_pkgdown.yml
codecov.yml
variableMetadataPreparation.Rproj

README.md

Travis build status Codecov test coverage Lifecycle: stable Documentation

variableMetadataPreparation

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

Deployment

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 smb://faust/gpd-transfer/username/username_out and you find the zipped file in Z://username/In_username. The zip file should go in Q://Variablenexport/miniCRAN_VariableMetadataPreparation. If at some point the transfer does not work properly, try splitting up the zip files to chunks of <100mb.

variableMetadataPreparation is to be installed in the library Q://Variablenexport/variableMetadataPreparation_productive/library and options_parser.R is supposed to be stored in Q://Variablenexport/variableMetadataPreparation_productive/R.

Checking the package and creating binaries on windows

Run 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 here: Q://Variablenexport/variableMetadataPreparation_productive/

Installation

Open an R session at Q://Variablenexport/variableMetadataPreparation, adjust the verison of variableMetadataPreparation in the file install_packages.R and run the command

source("./install_packages.R")

You're good to go.

Having trouble?

Please file an issue in our issue tracker

You can’t perform that action at this time.