Short introductory course for learning the basics of R, tailored for ADF&G biologists.
This course does not assume that you have any prior R knowledge, so don't be intimidated!
Attendees will watch the instructor present the PowerPoint presentation. At the end of each section, students will collaboratively write code and save a script, highlighting concepts associated with that section. Next, they will work through a "learnr" tutorial in a guided app to learn a bit more.
In the code
folder there are several groups of scripts. In general, these belong to one of three groups.
Tutorials: There are several "learnr" tutorials, each contained in their own folder.
Scripts: A stand-alone script that demonstrates PowerPoint concepts, and will either be reviewed together or independently.
Motivating Examples: Completed scripts showcasing several types of analyses, charts, and data types.
To open the code, ALWAYS start by double clicking the ADFG_R_Intro_Workshop.Rproj
file. Next, open the files as normal. This will ensure that the files run properly. Don't worry if this sounds a little confusing, we'll cover all this in class!
Code is numbered to be associated with each section in the PowerPoint, i.e., concepts covered in PowerPoint Section 3 "Programming Basics 1 - Poke the Box" will correspond to code in script 3 and also learnr tutorial 3.
To run the learnr tutorials on your own computer you will need to paste the following code into R and then run it:
install.packages(c("learnr", "shiny", "tidyverse", "lubridate", "scales", "palmerpenguins", "patchwork"))
Then open the desired tutorial script in RStudio and click "Run Document" above the script pane.
Welcome to the course! Your instructors are Logan Wendling and Matt Tyers, two biometricians with ADF&G. We have both learned R through a variety of methods including self-taught instruction, formal courses, reading books, and just by playing around in the program. We designed this course specifically based on many of the difficulties we both encountered on our journey. Logan and Matt both have experience teaching R to others and have taken a workshop on how to improve our teaching styles. That said, please ask us questions at any time!
This course will be split over three days. After each section we will take a small break.
09:00-09:30 - 1: Course Welcome
09:30-10:30 - 2: About R & RStudio
10:30-12:00 - 3: Programming Basics, Part 1
12:00-13:30 - Lunch Break
13:30-15:30 - 4: Programming Basics, Part 2
15:30-16:30 - 5: Introduction to the Tidyverse(R Markdown)
09:00-09:30 - Welcome Back and Review
09:30-11:00 - 6: Amazing Charts in ggplot, Part 1
11:00-12:00 - 6: Amazing Charts in ggplot, Part 2
12:00-13:30 - Lunch Break
13:30-14:30 - 7: Data Manipulation
14:30-16:30 - 7: Reading (real!) Data, Data Best Practices
09:00-10:00 - 8: The Extras
10:00-11:30 - 9: The Project
11:30-12:00 - 10: The Wrapup
- Recognize basic codes / commands
- Know the how & why of what code does
- Use this knowledge in new situations to create a visualization
- Recall resources to use after the class
Be kind: all else is details. Remember, this includes being kind to YOU
We are teaching & learning this together. Teach each other
Every mistake is a lesson. Ask us or yourself why something didn’t work
Communicate when we're going too fast. Let’s keep this a dialog