diff --git a/Gemfile.lock b/Gemfile.lock index 371cf58..fce8560 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -95,7 +95,7 @@ GEM activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.8.0) - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) jekyll (3.9.5) addressable (~> 2.4) diff --git a/R_notebooks/01_Introducing_Tidyverse.Rmd b/R_notebooks/01_Introducing_Tidyverse.Rmd index d815b58..7696076 100644 --- a/R_notebooks/01_Introducing_Tidyverse.Rmd +++ b/R_notebooks/01_Introducing_Tidyverse.Rmd @@ -22,13 +22,13 @@ The Tidyverse is self-described as: When you install the `tidyverse` package, you install a suite of packages. These include the following; we've marked the ones this course will introduce with a -☺: +\->: -- ☺ `readr`: Load 'rectangular' data into an R session (e.g. csv files). -- ☺ `dplyr`: Manipulate data (filtering, computing summaries, etc.) -- ☺ `tidyr`: Reshape data (e.g. into 'tidy' format). -- ☺ `stringr`: Working with strings. -- ☺ `lubridate`: Working with dates +- \-> `readr`: Load 'rectangular' data into an R session (e.g. csv files). +- \-> `dplyr`: Manipulate data (filtering, computing summaries, etc.) +- \-> `tidyr`: Reshape data (e.g. into 'tidy' format). +- \-> `stringr`: Working with strings. +- \-> `lubridate`: Working with dates - `ggplot2`: Visualise data. - `tibble`: A modern refresh of the core R dataframe, used throughout Tidyverse packages. diff --git a/R_notebooks/01_Introducing_Tidyverse_instructor.Rmd b/R_notebooks/01_Introducing_Tidyverse_complete.Rmd similarity index 94% rename from R_notebooks/01_Introducing_Tidyverse_instructor.Rmd rename to R_notebooks/01_Introducing_Tidyverse_complete.Rmd index 747dd4b..5e8fb47 100644 --- a/R_notebooks/01_Introducing_Tidyverse_instructor.Rmd +++ b/R_notebooks/01_Introducing_Tidyverse_complete.Rmd @@ -1,6 +1,8 @@ --- title: "Introducing the Tidyverse" -output: html_notebook +output: + html_document: + df_print: paged --- ## Outline @@ -22,13 +24,13 @@ The Tidyverse is self-described as: When you install the `tidyverse` package, you install a suite of packages. These include the following; we've marked the ones this course will introduce with a -☺: +\->: -- ☺ `readr`: Load 'rectangular' data into an R session (e.g. csv files). -- ☺ `dplyr`: Manipulate data (filtering, computing summaries, etc.) -- ☺ `tidyr`: Reshape data (e.g. into 'tidy' format). -- ☺ `stringr`: Working with strings. -- ☺ `lubridate`: Working with dates +- \-> `readr`: Load 'rectangular' data into an R session (e.g. csv files). +- \-> `dplyr`: Manipulate data (filtering, computing summaries, etc.) +- \-> `tidyr`: Reshape data (e.g. into 'tidy' format). +- \-> `stringr`: Working with strings. +- \-> `lubridate`: Working with dates - `ggplot2`: Visualise data. - `tibble`: A modern refresh of the core R dataframe, used throughout Tidyverse packages. diff --git a/R_notebooks/02_Loading_data_instructor.Rmd b/R_notebooks/02_Loading_data_complete.Rmd similarity index 100% rename from R_notebooks/02_Loading_data_instructor.Rmd rename to R_notebooks/02_Loading_data_complete.Rmd diff --git a/R_notebooks/03_Manipulating_a_dataframe_instructor.Rmd b/R_notebooks/03_Manipulating_a_dataframe_complete.Rmd similarity index 100% rename from R_notebooks/03_Manipulating_a_dataframe_instructor.Rmd rename to R_notebooks/03_Manipulating_a_dataframe_complete.Rmd diff --git a/R_notebooks/04_Piping_instructor.Rmd b/R_notebooks/04_Piping_complete.Rmd similarity index 100% rename from R_notebooks/04_Piping_instructor.Rmd rename to R_notebooks/04_Piping_complete.Rmd diff --git a/R_notebooks/05_Combining_datasets_instructor.Rmd b/R_notebooks/05_Combining_datasets_complete.Rmd similarity index 100% rename from R_notebooks/05_Combining_datasets_instructor.Rmd rename to R_notebooks/05_Combining_datasets_complete.Rmd diff --git a/R_notebooks/06_Reshaping_data_instructor.Rmd b/R_notebooks/06_Reshaping_data_complete.Rmd similarity index 100% rename from R_notebooks/06_Reshaping_data_instructor.Rmd rename to R_notebooks/06_Reshaping_data_complete.Rmd diff --git a/R_notebooks/07_Strings_and_dates.Rmd b/R_notebooks/07_Strings_and_dates.Rmd index 5f64b0b..785ba70 100644 --- a/R_notebooks/07_Strings_and_dates.Rmd +++ b/R_notebooks/07_Strings_and_dates.Rmd @@ -1,6 +1,8 @@ --- title: "Working with strings and dates with `stringr` and `lubridate`" -output: html_notebook +output: + html_document: + df_print: paged --- ## Outline @@ -147,7 +149,7 @@ Let's now clean up the 'Result' column by removing the commas: ### Exercise: replacing strings Put the 'Experiment' column into a consistent format, so that the experiment is -recorded as ":part " where "" is a date string and "" is a +recorded as `:part ` where `` is a date string and `` is a number 1, 2, etc. ```{r} @@ -238,6 +240,7 @@ use the pipe operator `|>` join the steps together. How many of the experiments features a run of 5 heads or 5 tails? We can answer this as follows: + - For each row, determine whether it contains a run of 5 heads or 5 tails. - Filter on the result. diff --git a/R_notebooks/07_Strings_and_dates_instructor.Rmd b/R_notebooks/07_Strings_and_dates_complete.Rmd similarity index 99% rename from R_notebooks/07_Strings_and_dates_instructor.Rmd rename to R_notebooks/07_Strings_and_dates_complete.Rmd index abac49f..952fd1a 100644 --- a/R_notebooks/07_Strings_and_dates_instructor.Rmd +++ b/R_notebooks/07_Strings_and_dates_complete.Rmd @@ -163,7 +163,7 @@ experiments |> ### Exercise: replacing strings Put the 'Experiment' column into a consistent format, so that the experiment is -recorded as ":part " where "" is a date string and "" is a +recorded as `:part ` where `` is a date string and `` is a number 1, 2, etc. ```{r} @@ -266,6 +266,7 @@ experiments |> How many of the experiments features a run of 5 heads or 5 tails? We can answer this as follows: + - For each row, determine whether it contains a run of 5 heads or 5 tails. - Filter on the result. diff --git a/R_notebooks/renv.lock b/R_notebooks/renv.lock index 662d8e9..89853ca 100644 --- a/R_notebooks/renv.lock +++ b/R_notebooks/renv.lock @@ -528,13 +528,13 @@ }, "renv": { "Package": "renv", - "Version": "1.0.4", + "Version": "1.0.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "utils" ], - "Hash": "11abaf7c540ff33f94514d50f929bfd1" + "Hash": "32c3f93e8360f667ca5863272ec8ba6a" }, "rlang": { "Package": "rlang", @@ -549,9 +549,9 @@ }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.25", + "Version": "2.26", "Source": "Repository", - "Repository": "RSPM", + "Repository": "CRAN", "Requirements": [ "R", "bslib", @@ -562,14 +562,13 @@ "jsonlite", "knitr", "methods", - "stringr", "tinytex", "tools", "utils", "xfun", "yaml" ], - "Hash": "d65e35823c817f09f4de424fcdfa812a" + "Hash": "9b148e7f95d33aac01f31282d49e4f44" }, "sass": { "Package": "sass", diff --git a/_config.yml b/_config.yml index 0089ff9..08f7b5a 100644 --- a/_config.yml +++ b/_config.yml @@ -6,7 +6,7 @@ description: A course on working with data in R using the Tidyverse. n_sessions: 2 prereq: NA url: https://uniexeterrse.github.io/r-data-course -notes_on: false +notes_on: true # Specify that things in the episodes collection should be output. collections: diff --git a/assets/materials/complete_course_materials.tar.gz b/assets/materials/complete_course_materials.tar.gz new file mode 100644 index 0000000..5e167bd Binary files /dev/null and b/assets/materials/complete_course_materials.tar.gz differ diff --git a/assets/materials/complete_course_materials.zip b/assets/materials/complete_course_materials.zip new file mode 100644 index 0000000..9dc9046 Binary files /dev/null and b/assets/materials/complete_course_materials.zip differ diff --git a/assets/materials/course_materials.tar.gz b/assets/materials/course_materials.tar.gz index d1065e7..fcf05fe 100644 Binary files a/assets/materials/course_materials.tar.gz and b/assets/materials/course_materials.tar.gz differ diff --git a/assets/materials/course_materials.zip b/assets/materials/course_materials.zip index b1bd504..81ae7e7 100644 Binary files a/assets/materials/course_materials.zip and b/assets/materials/course_materials.zip differ diff --git a/contents.md b/contents.md index 1c74eef..9f93826 100644 --- a/contents.md +++ b/contents.md @@ -5,6 +5,16 @@ title: Workshop contents ## Workshop contents -
    +The course materials are available below: + +- As a zip archive: [course_materials.zip]({{ site.url }}/assets/materials/course_materials.zip) +- As a tar gzip archive: [course_materials.tar.gz]({{ site.url }}/assets/materials/course_materials.tar.gz) + +Notebooks with all code and exercises completed are now available below: + +- As a Zip archive: [course_materials.zip]({{ site.url }}/assets/materials/complete_course_materials.zip) +- As a tar gzip archive: [course_materials.tar.gz]({{ site.url }}/assets/materials/complete_course_materials.tar.gz) + + diff --git a/etc/archive_notebooks.sh b/etc/archive_notebooks.sh new file mode 100644 index 0000000..495d91e --- /dev/null +++ b/etc/archive_notebooks.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Note: run from the project root directory + +starting_dir=$(pwd) +cd R_notebooks/ +tar -cvzf ../assets/materials/course_materials.tar.gz 01_Introducing_Tidyverse.Rmd 02_Loading_data.Rmd 03_Manipulating_a_dataframe.Rmd 04_Piping.Rmd 05_Combining_datasets.Rmd 06_Reshaping_data.Rmd 07_Strings_and_dates.Rmd 08_Summary.Rmd Working_with_data_in_R.Rproj data/ +zip -r ../assets/materials/course_materials.zip 01_Introducing_Tidyverse.Rmd 02_Loading_data.Rmd 03_Manipulating_a_dataframe.Rmd 04_Piping.Rmd 05_Combining_datasets.Rmd 06_Reshaping_data.Rmd 07_Strings_and_dates.Rmd 08_Summary.Rmd Working_with_data_in_R.Rproj data/ +tar -cvzf ../assets/materials/complete_course_materials.tar.gz 01_Introducing_Tidyverse_complete.Rmd 02_Loading_data_complete.Rmd 03_Manipulating_a_dataframe_complete.Rmd 04_Piping_complete.Rmd 05_Combining_datasets_complete.Rmd 06_Reshaping_data_complete.Rmd 07_Strings_and_dates_complete.Rmd 08_Summary.Rmd Working_with_data_in_R.Rproj data/ +zip -r ../assets/materials/complete_course_materials.zip 01_Introducing_Tidyverse_complete.Rmd 02_Loading_data_complete.Rmd 03_Manipulating_a_dataframe_complete.Rmd 04_Piping_complete.Rmd 05_Combining_datasets_complete.Rmd 06_Reshaping_data_complete.Rmd 07_Strings_and_dates_complete.Rmd 08_Summary.Rmd Working_with_data_in_R.Rproj data/ +cd "$starting_dir" \ No newline at end of file