Get access to all lessons in this course.
- Welcome to Reproducibility for the Rest of Us
- Reproducibility for the Rest of Us Course Logistics
- Using Space Wisely
- Naming All the Things
- Using Function Arguments
- Prologs & Annotation
- Using Seed Values
- Writing Functions for Repeated Tasks
- Literate Programming with Quarto
- Embedding Files to Improve Reproducibility
- Managing Project Files for Reproducibility
Reproducibility for the Rest of Us
Using Space Wisely
This lesson is locked
This lesson is called Using Space Wisely, part of the Reproducibility for the Rest of Us course. This lesson is called Using Space Wisely, part of the Reproducibility for the Rest of Us course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Open the
unformatted-r-code.R
file and fix the formattingAdd hard returns to keep lines short
Add spaces after punctuation and around operators
Indent functions or processes that go together
Choose an option:
Fix the formatting by hand
Fix the formatting by hand then then run
styler
to find anything missedFix it using the
styler
package entirely
Learn More
Two great resources on writing readable code are:
You need to be signed-in to comment on this post. Login.