Evertvdw
Evertvdw

Reputation: 947

Rstudio running in console in Rmd chunk

I recently updated to Rstudio version 1.0.136 coming from 0.99.902 if I'm not mistaken. One of the things that used to work and doesn't anymore is to run parts of the code in the chunk in the console and get the output (plot) in the plot section of the Rstudio environment.

Here is the code I'm using, inside of a .Rmd file:

```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide', message=FALSE}
attach(mtcars)
plot(wt, mpg) 
```

What I do is select the two lines inside the chunk, and press Ctrl+Enter, the command to run the selected lines in the console. Previously this outputted a plot to the 'Plots' tab, from which I can export it with the desired size etc.

However with the new version the plot does not show up here anymore when using Ctrl+Enter, just copy/pasting the code into the console still works obviously. What changed and how can I get it back to work without switching back to the previous version of Rstudio?

Upvotes: 1

Views: 2797

Answers (1)

Roman Luštrik
Roman Luštrik

Reputation: 70653

You need to check Chunk output in console under the settings button (grey sprocket).

enter image description here

Upvotes: 6

Related Questions