Deploying R shiny app using leaflet -
i create shiny map using leaflet can publish online others without r can view , interact it. can create shiny app using leaflet, when use 'publish' button in popup window error saying 'the directory deployed (~) exceeds maximum deployment size, 100mb. consider creating new directory containing content wish deploy.
i can't work out telling me. have ideas? have posted code below.
thanks, hugh
library(shiny) library(leaflet) shinyapp( ui = fluidpage(leafletoutput('mymap')), server = function(input, output) { # download , load data map = leaflet() %>% addtiles('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', attribution = paste( '© <a href="http://openstreetmap.org">openstreetmap</a> contributors', '© <a href="http://cartodb.com/attributions">cartodb</a>' ) ) %>% setview(-122.36, 47.67, zoom = 10) output$mymap = renderleaflet(map) } )
it's workaround worked me today, when deploying app myself:
when tried deploy shinyapp
inside standard .r file
rstudio, got same error message when clicked on "publish" button. when embedded code rmarkdown
document inside chunk, started working.
so copy code , open new rmarkdown file, click on "shiny document" , paste code 1 chunk , delete else header of rmarkdown file. when run code , click on "publish", should work.
Comments
Post a Comment