Hi I have an URL string but I need to replace a specific portion of the string to a variable
this is the code I have
todays_date <- as.character(Sys.Date())
URL <- "https://api.performancehorizon.com/reporting/export/export/click.csv?start_date=2021-11-23+00%3A00%3A00&end_date=2021-11-24+00%3A00%3A00&campaign_id=1011l3888&convert_currency=USD&ref_conversion_metric_id%5B%5D=2"
I would need to change the date where it says end_date at this moment is 2021-11-23 to whatever value the variable todays_date is, in this case is the sysdate (11/24/2021) so the final string should be
"https://api.performancehorizon.com/reporting/export/export/click.csv?start_date=2021-11-23+00%3A00%3A00&end_date=2021-11-24+00%3A00%3A00&campaign_id=1011l3888&convert_currency=USD&ref_conversion_metric_id%5B%5D=2"
I imagine there should be like a wild card where the variable would be in.
Thanks