无法看到有光泽的图像
Not able to see image in shiny
这是 http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/ 中的一个基本练习题,答案似乎也匹配到某个点,但是当应用程序 运行 即使在工作目录中,照片也不会显示。有人可以帮忙吗
library(shiny)
# Define UI
ui <- fluidPage(
titlePanel(strong("My shiny app"), windowTitle = "My first"),
sidebarLayout(sidebarPanel(
h1(strong("Installation")),
p("Shiny is available on CRAN, so you can install it in the usual way from your R console:"),
p(code('install.package("shiny")')),
br(),
br(),
br(),
br(),
img(src = "rstudio.png", height = 70, width = 200)
)
mainPanel("main panel"))
)
# Define server logic
server <- function(input, output) {
}
# Run the application
shinyApp(ui = ui, server = server)
答案上显示的答案可以借助图片下方的揭示答案看到。
图片路径:- http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/images/my-shiny-app.png
我还在学习,所以整个代码还没有写好,我也没有单独的 www/ 目录,因为这只是为了学习过程。不像其他类似问题那样创建徽标或其他内容。这只是图像添加点。
您的代码有误。
添加文件的完整路径。有时 Rstudio-viewer 不显示图像。但是您始终可以将应用程序打开到浏览器中。
ui <- fluidPage(
titlePanel(strong("My shiny app"), windowTitle = "My first"),
sidebarLayout(sidebarPanel(
h1(strong("Installation")),
p("Shiny is available on CRAN, so you can install it in the usual way from your R console:"),
p(code('install.package("shiny")')),
br(),
br(),
br(),
br(),
img(src = "http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/images/my-shiny-app.png", height = 70, width = 200)
),
mainPanel("main panel"))
)
这是 http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/ 中的一个基本练习题,答案似乎也匹配到某个点,但是当应用程序 运行 即使在工作目录中,照片也不会显示。有人可以帮忙吗
library(shiny)
# Define UI
ui <- fluidPage(
titlePanel(strong("My shiny app"), windowTitle = "My first"),
sidebarLayout(sidebarPanel(
h1(strong("Installation")),
p("Shiny is available on CRAN, so you can install it in the usual way from your R console:"),
p(code('install.package("shiny")')),
br(),
br(),
br(),
br(),
img(src = "rstudio.png", height = 70, width = 200)
)
mainPanel("main panel"))
)
# Define server logic
server <- function(input, output) {
}
# Run the application
shinyApp(ui = ui, server = server)
答案上显示的答案可以借助图片下方的揭示答案看到。 图片路径:- http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/images/my-shiny-app.png
我还在学习,所以整个代码还没有写好,我也没有单独的 www/ 目录,因为这只是为了学习过程。不像其他类似问题那样创建徽标或其他内容。这只是图像添加点。
您的代码有误。
添加文件的完整路径。有时 Rstudio-viewer 不显示图像。但是您始终可以将应用程序打开到浏览器中。
ui <- fluidPage(
titlePanel(strong("My shiny app"), windowTitle = "My first"),
sidebarLayout(sidebarPanel(
h1(strong("Installation")),
p("Shiny is available on CRAN, so you can install it in the usual way from your R console:"),
p(code('install.package("shiny")')),
br(),
br(),
br(),
br(),
img(src = "http://shiny.rstudio.com/tutorial/written-tutorial/lesson2/images/my-shiny-app.png", height = 70, width = 200)
),
mainPanel("main panel"))
)