3

I have an R markdown document using shiny with 6 or 7 plots. They all display until the 7th plot, which is a leaflet map, which doesn't display - when I 'run document' there is a big empty space at the bottom.

However, I have verified that the leaflet code works by running it in console, in another markdown document, and by moving it to the top of the current document - in the latter instance it does indeed render properly once placed at the top. But then the plot which is now at the bottom gets cut off instead!

I'm fairly new to markdown, but I wondered for example whether there is a maximum number of lines you can have in your document, and whether this could explain what's going on?

The global environment chunk is set simply as follows. I can post further code if helpful.

{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)

To reiterate, the plot succeeds if placed at the top of my page but not the bottom after my vanilla plots. If placed at the bottom, nothing after the leaflet appears either - there's just a massive gap of nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.