Skip to contents

If you want to specify the IDs of your own sensors, this function create a local configuration template file in the \inst directory, to edit with specific information. By default, the function doesn't create the file in the project directory but in a temp directory. If you want to have a permanent configuration, please use .

Usage

create_config(
  segments = list(`segment-01` = "9000000000", `segment-02` = "9000000000"),
  create_directory = FALSE,
  overwrite = FALSE
)

Arguments

segments

Named List of segments ("name1" = "9000000000", ...). Default to the example version.

create_directory

Boolean: Does the file need to be created in the project directory? Default to FALSE.

overwrite

Boolean: if the file exist, should it be overwriten? Default to FALSE.

Value

Boolean: TRUE if the file is created, FALSE overwise (config already exists for example).

Details

If you use the temporary options, please fill directly the name and number of your sensors in the "segments" argument.

Examples

create_config(create_directory=FALSE)
#> [1] TRUE
list_of_segments = list("Burel"= "9000002156", "Vitre" = "9000001844")
create_config(segments = list_of_segments,
  create_directory = FALSE,
  overwrite = TRUE) # the file already exists
#> [1] TRUE