From 3def2fed53b39cd10868b75eb21656ad86bdd0f2 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 5 Dec 2024 16:05:44 -0500 Subject: [PATCH 1/3] Add line break! --- index.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.Rmd b/index.Rmd index a4eefe73..b8ab3768 100644 --- a/index.Rmd +++ b/index.Rmd @@ -37,7 +37,7 @@ knitr::include_graphics("images/class.jpg") #### Online course -_`r config::get("online_dates")`_ +_`r config::get("online_dates")`_ _`r config::get("online_times")`_ Two-week online course in R programming foundations. @@ -46,7 +46,7 @@ Two-week online course in R programming foundations. #### Code-a-thon -_`r config::get("codeathon_dates")`_ +_`r config::get("codeathon_dates")`_ _`r config::get("codeathon_times")`_ Three-day in-person intensive “Code-a-thon”. Here, we'll work on authentic environmental health projects. We'll also practice data ethics skills in peer code review, reproducibility, and transparency in a supportive environment. From 16b7fc3a08dad4b400496d08f2fb67974dc31463 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 5 Dec 2024 16:19:57 -0500 Subject: [PATCH 2/3] Resolve #192 --- modules/Data_Input/Data_Input.Rmd | 19 ++++++++++--------- modules/Data_Input/lab/Data_Input_Lab_Key.Rmd | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/Data_Input/Data_Input.Rmd b/modules/Data_Input/Data_Input.Rmd index 899c1cfd..7bea24d4 100644 --- a/modules/Data_Input/Data_Input.Rmd +++ b/modules/Data_Input/Data_Input.Rmd @@ -36,6 +36,12 @@ R Projects are a super helpful feature of RStudio. They help you: - **Be more reproducible.** You can share the entire project directory with others, and they can replicate your environment and analysis without much hassle. +## Why projects? + +"The chance of the setwd() command having the desired effect – making the file paths work – for anyone besides its author is 0%. It’s also unlikely to work for the author one or two years or computers from now. The project is not self-contained and portable." + +- [Jenny Bryan](https://www.tidyverse.org/blog/2017/12/workflow-vs-script/) + **Let's go over how to create and use an R Project!** ## New R Project @@ -99,6 +105,10 @@ knitr::include_graphics("images/Data_Input_new_project_topright.png") * We are going to focus on simple delimited files first * comma separated (e.g. '.csv') * tab delimited (e.g. '.txt') + +
+
+**delimiters** are symbols that separate cells in a simple-text file. ## Data Input @@ -293,15 +303,6 @@ These functions have slightly different syntax for reading in data (e.g. `header However, while many online resources use the base R tools, the latest version of RStudio switched to use these new `readr` data import tools, so we will use them in the class for slides. They are also up to two times faster for reading in large datasets, and have a progress bar which is nice. - -## TROUBLESHOOTING: Setting the working directory - -If you are trying to knit your work, it might help to set the knit directory to the "Current Working Directory": - -```{r, fig.alt="Screenshot of the Knit menu, with Knit directory open, and Current Working Directory selected.", out.width = "60%", echo = FALSE, align = "center"} -knitr::include_graphics("images/Data_Input_knit_directory.png") -``` - ## Other Useful Functions - The `str()` function can tell you about data/objects. diff --git a/modules/Data_Input/lab/Data_Input_Lab_Key.Rmd b/modules/Data_Input/lab/Data_Input_Lab_Key.Rmd index d3f2c137..201a2e9d 100644 --- a/modules/Data_Input/lab/Data_Input_Lab_Key.Rmd +++ b/modules/Data_Input/lab/Data_Input_Lab_Key.Rmd @@ -65,7 +65,7 @@ Preview the data by examining the Environment. How many observations and variabl ### P.1 -Download the data and move the file to your project folder. Import the data by browsing for the file on your computer. +Download the data from https://daseh.org/data/CalEnviroScreen_data.csv and move the file to your project folder. Import the data by browsing for the file on your computer. > *Download the data* > *Put data in the project folder* From bb22288de1d881d344d6c81b3e194c909114ae8a Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 5 Dec 2024 16:28:19 -0500 Subject: [PATCH 3/3] code fix --- modules/Data_Input/Data_Input.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Data_Input/Data_Input.Rmd b/modules/Data_Input/Data_Input.Rmd index 7bea24d4..3aa82206 100644 --- a/modules/Data_Input/Data_Input.Rmd +++ b/modules/Data_Input/Data_Input.Rmd @@ -38,7 +38,7 @@ R Projects are a super helpful feature of RStudio. They help you: ## Why projects? -"The chance of the setwd() command having the desired effect – making the file paths work – for anyone besides its author is 0%. It’s also unlikely to work for the author one or two years or computers from now. The project is not self-contained and portable." +"The chance of the `setwd()` command having the desired effect – making the file paths work – for anyone besides its author is 0%. It’s also unlikely to work for the author one or two years or computers from now. The project is not self-contained and portable." - [Jenny Bryan](https://www.tidyverse.org/blog/2017/12/workflow-vs-script/)