hadley/adv-r

Possible formatting bug?

maxdrohde opened this issue · 0 comments

There is some strange formatting in this part of the Evaluation chapter (see below image). I think it is due to the sidebar styling.

adv-r/Evaluation.Rmd

Lines 150 to 165 in 714f95f

::: sidebar
**Expression vectors**
\index{expression vectors}
`base::eval()` has special behaviour for expression _vectors_, evaluating each component in turn. This makes for a very compact implementation of `source2()` because `base::parse()` also returns an expression object:
```{r}
source3 <- function(file, env = parent.frame()) {
lines <- parse(file)
res <- eval(lines, envir = env)
invisible(res)
}
```
While `source3()` is considerably more concise than `source2()`, this is the only advantage to expression vectors. Overall I don't believe this benefit outweighs the cost of introducing a new data structure, and hence this book avoids the use of expression vectors.
:::

Screen Shot 2020-11-29 at 2 16 29 AM