Search code examples
rplotrstudior-markdownmanipulate

Manipulate slider does not appear in 'plot'


Simple question: What prevents manipulate sliders from appearing in the 'plot' section of R Studio?

Let's take a very simple example, run in an Rmarkdown chunk:

manipulate(
    plot(1:x), x = slider(1, 100)
  )

In rmarkdown, this doesn't show the plot and slider in the 'plots' pane. Instead the plot shows below the chunk.

How do I make the manipulate functionality appear?


Solution

  • The answer is to choose the gear above the rmarkdown document and choose 'Chunk Output in Console'.

    enter image description here