R Shiny 将图片添加到带有文本的流体行中的框中

Owl*_*ieW 2 r image shiny

我正在尝试添加一个框作为 Shiny 应用程序的一部分,以在应用程序顶部包含一些文本(说明)和一个图像(徽标)。这是我到目前为止的代码。

frow5 <- fluidRow(
  box(
    title = "Instructions"
    ,status = "primary"
    ,solidHeader = FALSE 
    ,collapsible = FALSE 
    ,textOutput("instructions")
    , height = 320
    , width = 12
    , align='ccc'


  )

)

output$instructions <- renderText("Some text")
Run Code Online (Sandbox Code Playgroud)

目前我已经指定了一个 textOuput 参数,但我需要一个图像作为同一个框的一部分,右对齐。有什么建议?

sho*_*aco 6

在框内添加一个fluidRow怎么样,有2列,一列用于文本,另一列用于图像?

box(title = "Instructions",
    status = "primary",
    solidHeader = F,
    collapsible = F,
    width = 12,
    fluidRow(column(width = 10, textOutput( "instructions" )),
             column(width = 2, align = "center",
                      img(src="http://images.all-free-download.com/images/graphiclarge/natural_beauty_highdefinition_picture_166133.jpg", width=100))))
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明