Skip to content

Saving plots to .rds files #344

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

Closed
teunbrand opened this issue Jan 25, 2023 · 3 comments
Closed

Saving plots to .rds files #344

teunbrand opened this issue Jan 25, 2023 · 3 comments

Comments

@teunbrand
Copy link
Contributor

The advice given in this section of the book:

* Save a cached copy of it to disk, with `saveRDS()`. This saves a complete
copy of the plot object, so you can easily re-create it with `readRDS()`.
\indexf{saveRDS} \indexf{readRDS}
```{r summary}
saveRDS(p, "plot.rds")
q <- readRDS("plot.rds")
```

Is being called a 'flawed workflow' in tidyverse/ggplot2#3994 (comment) and complicates between-version compatability as mentioned here: tidyverse/ggplot2#3994 (comment). I think it might be best to omit this advice altogether.

@hadley
Copy link
Owner

hadley commented Jan 25, 2023

Oh yeah, that's definitely a DON'T DO.

@djnavarro
Copy link
Collaborator

ooh, yeah, I'll fix that one now!

@teunbrand
Copy link
Contributor Author

Thanks!

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

No branches or pull requests

3 participants