coding style for = operator in knitr code chunk options brackets

75 Views Asked by At

I've noticed that RStudio's auto-completion of knitr code chunk options defines the arguments with a = operator without any leading or trailing spaces. E.g.,

```{r echo = FALSE, warning = FALSE, message = FALSE, eval = TRUE, fig.show = 'hold'}
rnorm(100)
```

Hadley's R code style guide calls for spaces around all infix operators.

So is there a different coding style for knitr code chunk options? I see a case for it if the goal is to minimize width of code chunk options definitions, I guess. But it would be nice if RStudio but spaces around the = if the no-space style is just a legacy.

0

There are 0 best solutions below