Thanks for that solution Ramnath.
So, I'm encountering another problem, I can't seem to get shiny to display an image in the table which stored on my machine. The flag images, specified by URL, work fine, but nothing displays when I give the file name of an image place in the shiny app's home directory. I have checked the HTML and it appears to be just the same as that in HTML docs which succeed at displaying images stored on the local machine.
My server.R script I am using is pasted below (the ui.R script is exactly the same as used in your example). The script does check and display what the working directory of the program is. I have also tried giving it an absolute file path, to no avail.
Does anyone know a way to display a locally hosted image in a table generated by shiny? Can anyone suggest any other sort of work-around?
Thank you for you help.
#server.R
require(shiny)
shinyServer(function(input, output){
output$mytable <- renderTable({
dat <- data.frame(
country = c('USA', 'China','Working directory'),
flag = c('<img src="./test.png" 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>',
getwd())
)
dat
}, sanitize.text.function = function(x) x)
})