Skip to content
Discussion options

You must be logged in to vote

It works just fine for me without and with the inline R code with knitr 1.42 and Quarto 1.2.335.
Cache is for variables not packages loading, so you need to be sure calls to library & co are not cached.

Your need more backticks around (I am using a block with five `):

````
---
title: "minimal"
format: html
execute:
  cache: true
  echo: false
---

```{r}
library(magrittr)
```

```{r}
some_data <- cbind(c(1,2), c(3,4))
```

some text

```{r}
some_data %>% head()
```

more text

`r some_data %>% head()`
````

PS: why some_data %>% .[1,1]? Even for a demo about the issue of not having the function, it should never be written, in my opinion.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@setseed13
Comment options

@mcanouil
Comment options

@setseed13
Comment options

@mcanouil
Comment options

@setseed13
Comment options

Answer selected by setseed13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants