13.2 The Information Boxes
Please see the infoboxes output in the 12.2.1 chapter. Let’s start by creating the custom box first, then how to use lapply
to apply for all keywords
13.2.1 The individual information box
I started from the top to the bottom and left to right. These were text informations, so I used the renderText()
to render and htmlOutput()
to print out the output
- Date
output[[paste("1", name[[a]])]] <- renderText(HTML(
paste0(
"<span style='font-size:16px;color:white;'>",
min(df1$date),
" to ",
max(df1$date),
"</span><span style='font-size:16px;'> </span>"
)
))
# print output
htmlOutput(paste("1",name[[a]]),style = "text-align:left;")
- Name of the keyword
output[[name[[a]]]] <- renderText(HTML(
paste0(
"<span style='font-size:30px;'>",
name[[a]],
"</span><span style='font-size:18px;'> </span>"
)
))
# print output
htmlOutput(name[[a]],style = "text-align:center;color:#32907c")
Maximum hits
Average hits.
Rank