UIdaho-CALS version
https://idahoagstats.github.io/r-for-ag-scientists/
- Students are encouraged to install and use R + RStudio on their own computers
- Students will be asked to join Posit cloud. This is so they can download all files and if need be, use Posit Cloud for learning R.
- We will be live coding in Posit cloud and saving our scripts there so students can peek in here if needed.
- We will use quarto files for teaching, and we might introduce .R files later
- lesson zero: how each day will go, how the course is structured, how to succeed in learning R
- tour of RStudio
- First real lesson: getting-to-know-data. This is designed to get users comfortable using R. It will directly teach basic concepts: importing a CSV file, looking at data, running cross tabulations, producing data summaries, doing some simple data visualizations (base plotting only), calculating new variables. It is implicitly teaching other topics we will not address at all directly (or only minimally so): how to call and use an R function, variable/data types, object types, and math operations + vectorizing. Those lessons still exist, but will fold them into "getting to know data" and indicate that these documents are more comprehensive guides to those topics.
- Importing tabular files
- Data transformation & wrangling
- R documentation (help files, how to use functions)
- Exporting R objects to file
- Data aggregation + summary
- Reshaping data
- Combining data sets
- Visualizing data in R with ggplot
- Finding help in R when you're stuck (meta)
- Priciples of Reproducible research in R (meta)
- How to do repeating actions (if time)
-
A posit classroom is set up with only one project. At the time of writing this, we will use that project for the entire class.
-
The R session should be restarted at the end of each lesson / beginning of the following lesson to wipe objects, packages loaded, etc
-
All tidyverse packages will be installed to the project prior to sharing it.
-
currently, invitations can only be sent one-at-a-time. The workaround is to share an open link, then later change the access setting to "invitation only"
-
In the initial set-up, the project contains these files:
- caribbean_maize.csv
- field_trial_2009.xlsx
- genotypic_data.txt
- genotypic_data_rotated.txt
- trial_data.csv
- trial_metadata.csv
- weather_data.csv
- project.Rproj
-
Every student should make a permanent copy of this project. Over time, we will create more files and save them to this project.
-
students need to encouraged to visit this Posit Cloud project as often as they wish and to use Posit cloud outside of class time.
- This is intended to be delivered as a live coded class
- There are special lessons that are largely lecture and hence exceptions to the live-coded format:
- RStudio
- R functions & R help
- R for reproducible research