2017-05-26 6 views
1

RShinyアクションボタンに画像を追加するにはどうすればよいですか? JPEGファイルと同じように...RShinyアクションボタンに画像を追加する

shinyUI(fluidPage( 
    titlePanel("Image on button"), 

    sidebarLayout(
    sidebarPanel(

    ), 

    # Show a plot of the generated distribution 
    mainPanel(
     actionButton("button","Submit"), 
    ) 
) 
)) 
+0

はuが行います素晴らしい画像やフォントが必要ですか? http://fontawesome.io/icons/、もし 'actionButton'と他の多くのエディタが' icon'引数を持っていれば –

答えて

0
私の解決策以下

shinyUI(fluidPage( titlePanel("Image on button"), sidebarLayout( sidebarPanel( ),

#Show a plot of the generated distribution mainPanel( actionButton("button","Submit",), tags$button( id = "my_button", class = "btn action_button",
tags$img(src = "http://i0.wp.com/unaracnidounacamiseta.com/wp- content/uploads/2012/07/lorem.jpg",height = "50px") #internet image #tags$img(src = "your_image.png",height = "50px") #local image ),
) ) ) )

関連する問題