Subscript error when trying to save/preview notebook
<p>EDIT: It seems as though RStudio Preview version 0.99.1285 has issues with notebooks and rMarkdown documents. An install of the standard RStudio is able to knit the same code. Thanks everyone for the time and effort.</p>

<p>I'm trying to create a simple R notebook in order to generate readable analysis reports. However whenever I try to run my notebook I get a subscript out of bounds error that I haven't been able to diagnose and resolve. </p>

<p>I've updated all my packages and recreated similar code but I get the same error.</p>

<p>The R Markdown code (library(dplyr) loaded in global environment)
edit: added library(dplyr) in first chunk</p>

<pre><code>---
title: "R Notebook"
output: html_notebook
---

```{r}
library(dplyr)
```


```{r}
adataframe&lt;-data_frame(a=rnorm(160),
                       b=rnorm(160,mean=5,sd=10),
                       c=sample(1:100,160,replace=TRUE),
                       z=sample(1:100,160,replace=TRUE),
                       letter=rep(c("w","x","y","z"),40))
```

test test min z is `r min(adataframe$z)` to max z at `r max(adataframe$z)`

```{r}
adataframe %&gt;%
  select(letter,z,b,a) %&gt;% 
  group_by(letter) %&gt;%
  summarise_all(sum) %&gt;% 
  mutate(division1=z/b,division2=b/a)
```
</code></pre>

<p>If I preview the document without running the chunks, the document displays as expected.</p>

<p>However If I run all the code chunks and try to preview the document I get this following error:</p>

<pre><code>Quitting from lines 7-8 (test.Rmd) 
Error in csvs[[i + 1]] : subscript out of bounds
</code></pre>

<p>Which corresponds with the first code chunk.</p>

<p>This is a test notebook in a new project and as such has no other objects in the Global Environment other than "adataframe".</p>

<p>Thanks for reading.</p>