title: R Shiny, how to display a shapefile (map) in a tab?
body: <p>I'm new to R and shiny package.</p>
  
  <p>I have created a map with tmap and gdal packages and I woud like to know how to display it in a shiny tab ?</p>
  
  <p>Which is the command that allows it ?</p>
  
  <p>Thank you very much.</p>
  
  <p>Have a great day.</p>
  
  <p>Ok, so, this is what I did with maptools package, but there's nothing in the tab :</p>
  
  <pre><code>    server : shpFile &lt;- readShapePoly("c:\shapefiles\counties.shp")
               output$map &lt;- renderPlot({shpFile})
  
  
      ui : tabPanel("Map",
                           mainPanel(plotOutput("map"))
                                     )
  </code></pre>
  
  <p>So, if you see where is the problem, thank you for helping me.</p>
  
  <p>EDIT : Ok, I found it.</p>
  
  <p>This is the Server.R code :</p>
  
  <pre><code>output$SHPplot &lt;-  renderPlot({
    lnd &lt;- readOGR(dsn = "//test/Shapefiles",
                   layer = "Countries")
  
  tm_shape(lnd) +
      tm_fill("COUNTRIES", title = "GDP", style = "fixed",
              breaks = c(60, 70, 80, 90, 100),
              #      palette = c("red", "yellow", "blue", "turquoise")) +
              #      col=c("#edf8fb", "#b2e2e2", "#662a4", "238b45")) +
              palette = "YlOrRd") +
      tm_borders() +
      tm_layout("Wealth (or so)",
                legend.title.size = 1,
                legend.text.size = 0.6,
                legend.position = c("left","bottom"),
                legend.bg.color = "white",
                #legend.digits = 5,
                legend.bg.alpha = 1)
        })
  </code></pre>
  
  <p>And Ui.R code :</p>
  
  <pre><code>plotOutput("SHPplot", height = 675)
  </code></pre>
  
  <p>Thanks for helping.</p>