Skip to content

Instantly share code, notes, and snippets.

@jeremyyeo
Last active April 15, 2020 23:25
Show Gist options
  • Select an option

  • Save jeremyyeo/c397737f2d6f79ee8eb9ba2bb1b469de to your computer and use it in GitHub Desktop.

Select an option

Save jeremyyeo/c397737f2d6f79ee8eb9ba2bb1b469de to your computer and use it in GitHub Desktop.
Loading cache from an RMarkdown doc into an interactive R session.
# Load the cached data in an interactive session.
lazyLoad("main_cache/html/data_xxxxxxxxxxxxxx") # Notice the lack of a file extension.
mean(x)
---
title: "Title"
output: html_document
---
```{r data, cache=T}
x <- runif(100, min = 0, max = 1)
```
```{r}
print(mean(x))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment