View source: R/abimo_functions_am.R
replace_value | R Documentation |
searches string for parameter=<pattern_value> and replaces with parameter=<new_value> for all found entries
replace_value(
string,
new_value,
parameter = "etp",
pattern_value = "\"[0-9]+?\\.?[0-9]+?\""
)
string |
string with ABIMO config |
new_value |
new parameter value |
parameter |
parameter name to search for (default: "etp") |
pattern_value |
pattern of value field (default: '\"[0-9]+?\.?[0-9]+?\"') |
returns string with modified parameter = value
### Simple string
string <- '<item bezirke="15,16,18,19,20" etp="807" etps="600" />'
replace_value(string, new_value = 100, parameter = "etp")
replace_value(string, new_value = 100, parameter = "etps")
### Default ABIMO config
config <- readLines(kwb.abimo::default_config())
replace_value(config, new_value = 100, parameter = "etp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.