2017-05-26 2 views
1

Wie kann ich ein Bild zur RShiny Aktionstaste hinzufügen? Wie eine JPEG-Datei ...Bild zu RShiny actionButton hinzufügen

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

    sidebarLayout(
    sidebarPanel(

    ), 

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

Sie benötigen u ein Bild oder Schrift genial tun? http://fontawesome.io/icons/, wenn ja, haben "actionButton" und viele andere Editoren das 'icon' Argument –

Antwort

0

Im Folgenden meine Lösung

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 ),
) ) ) )