r - rmarkdown error "attempt to use zero-length variable name" -


when generate new rmarkdown file (or open existing rmarkdown-files) , try run rmarkdown chunk, error: "error: attempt use zero-length variable name". have win10 , did fresh install of r , rstudio yesterday. did miss? error come from?

```{r cars} summary(cars) ``` 

```{r cars} error: attempt use zero-length variable name

enter image description here

the problem due object being changed in global environment in earlier session , session got saved in global ennvironment. better not save in global environment, while ending rstudio session (or r console). 1 option call data(cars) again original dataset

--- title: "untitled" output:   html_document: default   'html_document:': default ---  ```{r setup, include=false} knitr::opts_chunk$set(echo = true) ```  ```{r cars} data(cars) summary(cars) 

-output enter image description here

one option avoid these kind of surprises use "don't save" option while quitting session

enter image description here


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -