I'd like to build a character value with the month name in it. I can extract the month name by using today() >%> months()
, but as soon as I pipe the result into glue()
, and start using the placeholder (.
), the value behind the placeholder gets duplicated. Does anybody know what's going on here?
library(lubridate)
library(glue)
library(magrittr)
# returns month name as character
today() %>%
months()
#> [1] "April"
# when piping into glue(), I get an unexpected output
today() %>%
months() %>%
glue("my_test_{.}")
#> Aprilmy_test_April
Created on 2019-04-04 by the reprex package (v0.2.1)