Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何使用renderText将文件打印到_Html_R_Shiny - Fatal编程技术网

Html 如何使用renderText将文件打印到

Html 如何使用renderText将文件打印到,html,r,shiny,Html,R,Shiny,我在这里遗漏了一些东西,因为图像没有显示 谢谢 shinyServer(function(input, output) { src = "einstein.jpg" print(file.exists(src)) out = '<img src="einstein.jpg" style=width:304px;height:228px;>' output$text3<-renderText(out) }) shinyUI(fluidPage( ht

我在这里遗漏了一些东西,因为图像没有显示

谢谢

shinyServer(function(input, output) {
  src = "einstein.jpg"
  print(file.exists(src))
  out = '<img src="einstein.jpg" style=width:304px;height:228px;>'
  output$text3<-renderText(out)

  })

shinyUI(fluidPage(

  htmlOutput("text3")

))
shinyServer(功能(输入、输出){
src=“einstein.jpg”
打印(file.exists(src))
out=“”

输出$text3如果您将图片
einstein.jpg
放在应用程序的
img/
子文件夹中,您可以使用
addResourcePath
访问它:

library(shiny)
shinyApp(ui=fluidPage(htmlOutput("text3")),
         server=(function(input, output) {
           addResourcePath("foo", "img")  
           out = '<img src="/foo/einstein.jpg" style=width:304px;height:228px;>'
           output$text3<-renderText(out)
         }))
库(闪亮)
shinyApp(ui=fluidPage(htmlOutput(“text3”)),
服务器=(函数(输入、输出){
addResourcePath(“foo”、“img”)
out=“”

输出$text3您是否试图显示jpg或与html标记关联的代码?