You can use tableHTMLto achieve it with the help make_css()that creates a css file that can be used in a brilliant web application. You can check this vignette for more details.
library(shiny)
library(tableHTML)
dat <- data.frame(
country = c('USA', 'China'),
flag = c('<img src="http://bpic.588ku.com//element_origin_min_pic/16/11/14/2f4de8bcf22409518c2fe2d74a49d9c7.jpg" height="52"></img>',
'<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Flag_of_the_People%27s_Republic_of_China.svg/200px-Flag_of_the_People%27s_Republic_of_China.svg.png" height="52"></img>'
)
)
Use make_css()to create css, which allows you to expand the image. It will look like this:
img {
transition: transform 0.25s ease;;
}
img:hover {
transform: scale(1.5);
}
ui<-fluidPage(
br(),
tags$style(make_css(list(c('img'),
c('transition'),
c('transform 0.25s ease;')))),
tags$style(make_css(list(c('img:hover'),
c('transform'),
c('scale(10) translate(50%, 50%)')))),
uiOutput("mytable")
)
On the server, create tableHTML:
server<-function(input, output){
output$mytable <- renderUI({
tableHTML(dat,
escape = FALSE,
rownames = FALSE)
})
}
shinyApp(ui=ui,server=server)
:

, :

. theme css . . tableHTML vignette examples,