Error when rendering notebook: unexpected symbol

279 Views Asked by At

I have an R Notebook script with the setup chunk defined below. I keep getting this error:

Error in source("~/Documents/testing.Rmd") : 
  ~/Documents/testing.Rmd:11:9: unexpected symbol
10: # Setup  
11: Ensures that

I've read other threads about this error and can't find an error in my syntax for these lines. Any help would be appreciated; the html of the script seems to generate fine, but the error is concerning me.

# Setup  
Ensures that working directory is set for all code chunks and loads packages required for script.

```{r setup}

library(knitr)
library(rmarkdown)
library(stringr)
library(tidyverse)

knitr::opts_knit$set(root.dir = normalizePath("/Users/Documents/"))

```
0

There are 0 best solutions below