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

Begin by promoting .Rmd files as preferred reproducibility #45

Open
libjohn opened this issue Jan 11, 2021 · 0 comments
Open

Begin by promoting .Rmd files as preferred reproducibility #45

libjohn opened this issue Jan 11, 2021 · 0 comments

Comments

@libjohn
Copy link
Contributor

libjohn commented Jan 11, 2021

throwing this out there for thought....

In line 237 of _episodes/01-intro-to-r.Rmd rm(list = ls()) is used. Because of what I'm reading and trying to practice about reproducibility, I want to suggest a change; specifically to promote .RMD scripts as the basic way to use R, this is instead of using .R scripts and ultimately instead of using rm(list = ls()). Since this is potentially a big change, I want to start the conversation....

I'm suggesting adding the following at line 239:
Note: rm(lists = ls())was a conventional and standard way to clear objects from the environment. Many coders habitually put that code at the top of their scripts. However, over time the R community began promoting more reproducible approaches to coding. The best way to clear your environment is write your scripts assuming a fresh R process and use the _Restart R and Run All Chunks_ feature of R Markdown documents. Learn more: [Restart R often during development](https://rstats.wtf/save-source.html#restart-r-often-during-development) and [What's wrong withrm(list = ls())](https://rstats.wtf/save-source.html#rm-list-ls)

This may suggest a different overall starting point where we do not even introduce the .R script, i.e. using .Rmd scripts instead of .R.

What do you think? We may want to shift the conversation to slack or our next meeting.

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

1 participant