Description Usage Arguments Author(s) Examples
Inputs values into yaml file by locating the label and key within the yaml file. Preserves comments (#) if present. NOTE: this does not use a yaml parser so if there are yaml formatting errors this function will not pick them up.
1 | input_yaml(file = "gotm.yaml", label, key, value, out_file = NULL)
|
file |
filepath; to .yaml which you wish to edit |
label |
string; which corresponds to section where the key is located |
key |
string; name of key in which to input the value |
value |
string; to be input into the key/value pair. Note boolean values must be input as 'true'/'false' as per the yaml format |
out_file |
filepath; to write the output yaml file (optional); defaults to overwriting file if not specified |
Tadhg Moore
1 2 3 | input_yaml(file = 'gotm.yaml', label = 'airp', key = 'file', value = 'met.dat', out_file = 'samp.yaml')
input_yaml(file = 'gotm.yaml', label = 'airp', key = 'file', value = 'met.dat', out_file = 'samp.yaml')
input_yaml(file = 'gotm.yaml', label = 'meteo', key = 'calc_evaporation', value = 'true', out_file = 'samp.yaml')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.