I have a url that I need to send a request to using date variables. The https address takes the date variables. I\'d like to assign the dates to the address string using somethi
As an alternative to sprintf
, you might want to check out glue.
Update: In stringr 1.2.0 they've added a wrapper function of glue::glue()
, str_glue()
library(glue)
year = "2008"
mnth = "1"
day = "31"
url = glue("https:.../KBOS/{year}/{mnth}/{day}/DailyHistory.html")
url
#> https:.../KBOS/2008/1/31/DailyHistory.html