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. diff --git a/modules/Data_Input/Data_Input.Rmd b/modules/Data_Input/Data_Input.Rmd index 899c1cfd..3aa82206 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*