read_config: Read configuration

Description Usage Arguments Details Value Examples

View source: R/config.R

Description

Read the ARCHIMED configuration file parameters and return one, several or all parameters as a list or as a tibble::tibble()

Usage

1
read_config(file, parameter = NULL, format = c("list", "tibble"))

Arguments

file

The path to the ARCHIMED configuration file

parameter

A vector or list of parameter names. If NULL, returns all parameters.

format

The output format. Should be either "list" or "tibble".

Details

The list output format ensures that numeric parameters are treated as is. On the contrary, the tibble::tibble() output will return all parameters as characters if at least one is found to be character. This behavior is used to ensure a consistant expected output. The parameter names are partially matched, so the user can retreive their values without the need of perfectly knowing their names. The configuration file is named "ArchimedConfiguration.properties".

Value

The ARCHIMED configuration parameters as a list or a tibble::tibble()

Examples

1
2
3
4
5
6
7
8
9
 ## Not run: 
 # Read two parameters, with partial matching (latit instead of latitude):
 read_config(file = "Archimed_July_2018/app_parameters/ArchimedConfiguration.properties",
             parameter = c("latit","altitude"))
 # read all parameters:
 read_config(file = "Archimed_July_2018/app_parameters/ArchimedConfiguration.properties")

 
## End(Not run)

VEZY/archimedR documentation built on Feb. 28, 2020, 6:36 p.m.