Package 'json2aRgs'

Title: Parse Parameters Inside a Docker Container
Description: The functions get_parameters() and get_data() are intended to be used within a docker container with a certain file structure to read keyword arguments from the file /in/input.json automagically. The file /src/tool.yaml contains specifications on these keyword arguments, which are then passed as input to containerized R tools in the tool-runner framework.. A template for a containerized R tool, which can be used as a basis for developing new tools, is available at the following URL: <https://github.com/VForWaTer/tool_template_r>.
Authors: Alexander Dolich [cre, aut], Mirko Mälicke [aut]
Maintainer: Alexander Dolich <[email protected]>
License: GPL-3
Version: 0.4.0
Built: 2024-11-12 05:41:26 UTC
Source: https://github.com/vforwater/json2args

Help Index


get_data

Description

This package is intended to be used inside a docker container to parse data from "/in/input.json" with the help of the input configuration in "/src/tool.yml". The data can be parsed by file extension. If return_data_paths is set to FALSE, the function will return the paths to the data files. If set to TRUE, the function will try to parse the data.

Usage

get_data(return_data_paths = FALSE)

Arguments

return_data_paths

Logical. If FALSE (default), the function will return the paths to the data files. If TRUE, the function will try to parse the data.

Value

A list of the parsed data specified in "/in/input.json"

Examples

## Not run: 
     data <- get_data()
     
## End(Not run)

get_parameters

Description

This package is intended to be used inside a docker container to parse parameters from "/in/input.json" with the help of the parameter configuration in "/src/tool.yml".

Usage

get_parameters()

Value

A list of the parsed parameters specified in "/in/input.json"

Examples

## Not run: 
     params <- get_parameters()
     
## End(Not run)