Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible formatting bug? #1651

Open
maxdrohde opened this issue Nov 29, 2020 · 0 comments
Open

Possible formatting bug? #1651

maxdrohde opened this issue Nov 29, 2020 · 0 comments

Comments

@maxdrohde
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants