Rmd. Error in chunk if it ends with two or more blank lines or one or more comments (started with hash symbols)

I am using RStudio 2023.06.1 Build 524 over Ubuntu 22.04.
Reproducing the error is quite simple, just clic in RStudio: File-->New file-->R Mardown... In the "New R Markdown" window select PDF and press OK button. A default Rmd file is shown in the RStudio code editor. Go to the cars chunk (line 18). The chunk looks like this:

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

Add two empty new lines after the command. You should have something like this:

```{r cars}
summary(cars)


```

Now, knit the Rmd. I get this error:

Error en evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, : 
  is.call(call) || is.language(call) || is.atomic(call) is not TRUE
Calls: <Anonymous> ... evaluate -> <Anonymous> -> evaluate_call -> stopifnot

I also get the same error if instead of 2 or more empty lines you have 1 or more hash symbol comments. For instance:

```{r cars}
summary(cars)
#Just a comment also fails. 
```

However, this doesn't happen with RStudio Server 1.2.1335 over Ubuntu 16.04

Anyone has got this result? Any solution?

Best regards,

-Mariano

Sorry for the delay here. I hope since then you manage to find that this was related to evaluate. Updating the package should have solved this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.