I’m trying to glue some strings together in an R data-frame. This code worked perfectly in the last R studio version I had; upon updating R studio I’m now getting an error when trying to run this code:
library(stringr)
timeline.data.example <- data.frame(
event = c('event A', 'event B', 'event C'),
start = c('2020-02-29', '2020-02-10', '2020-03-26'),
end = c('2020-02-29', '2020-02-10', '2020-03-29'),
stringsAsFactors = FALSE
)
timeline.data.example$start <-as.Date(timeline.data.example$start)
timeline.data.example$end <-as.Date(timeline.data.example$end)
timeline.data.example$startFormatted <- format(timeline.data.example$start, format="%B %d, %Y")
timeline.data.example$endFormatted <- format(timeline.data.example$end, format="%B %d, %Y")
timeline.data.example$tooltip <- ifelse(timeline.data.example$start==timeline.data.example$end,str_glue("<b>",
"{timeline.data.example$event} ","</b>",'<br>',
"Date: {timeline.data.example$startFormatted} ",
),str_glue("<b>",
"{timeline.data.example$event} ","</b>",'<br>',
"Start Date: {timeline.data.example$startFormatted}",'<br>',
"End Date: {timeline.data.example$endFormatted}",'<br>',
))
I get the error:
Error in eval(call("force", as.symbol(paste0("..", x)))) :
argument "..6" is missing, with no default
What is causing this error?
4