Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from UniExeterRSE/dev
Browse files Browse the repository at this point in the history
Release v1.1.0
  • Loading branch information
thawes-rse authored Mar 19, 2024
2 parents 0be2ff4 + 3091f46 commit e364b40
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions R_notebooks/01_Introducing_Tidyverse.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Introducing the Tidyverse"
output: html_notebook
output:
html_document:
df_print: paged
---

## Outline
Expand All @@ -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.
Expand Down
File renamed without changes.
7 changes: 5 additions & 2 deletions R_notebooks/07_Strings_and_dates.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Working with strings and dates with `stringr` and `lubridate`"
output: html_notebook
output:
html_document:
df_print: paged
---

## Outline
Expand Down Expand Up @@ -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 "<date>:part <n>" where "<date>" is a date string and "<n>" is a
recorded as `<date>:part <n>` where `<date>` is a date string and `<n>` is a
number 1, 2, etc.

```{r}
Expand Down Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ experiments |>
### Exercise: replacing strings

Put the 'Experiment' column into a consistent format, so that the experiment is
recorded as "<date>:part <n>" where "<date>" is a date string and "<n>" is a
recorded as `<date>:part <n>` where `<date>` is a date string and `<n>` is a
number 1, 2, etc.

```{r}
Expand Down Expand Up @@ -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.

Expand Down
11 changes: 5 additions & 6 deletions R_notebooks/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -549,9 +549,9 @@
},
"rmarkdown": {
"Package": "rmarkdown",
"Version": "2.25",
"Version": "2.26",
"Source": "Repository",
"Repository": "RSPM",
"Repository": "CRAN",
"Requirements": [
"R",
"bslib",
Expand All @@ -562,14 +562,13 @@
"jsonlite",
"knitr",
"methods",
"stringr",
"tinytex",
"tools",
"utils",
"xfun",
"yaml"
],
"Hash": "d65e35823c817f09f4de424fcdfa812a"
"Hash": "9b148e7f95d33aac01f31282d49e4f44"
},
"sass": {
"Package": "sass",
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file not shown.
Binary file added assets/materials/complete_course_materials.zip
Binary file not shown.
Binary file modified assets/materials/course_materials.tar.gz
Binary file not shown.
Binary file modified assets/materials/course_materials.zip
Binary file not shown.
14 changes: 12 additions & 2 deletions contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ title: Workshop contents

## Workshop contents

<ol>
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)

<!-- <ol>
{% include toc.html %}
</ol>
</ol> -->
11 changes: 11 additions & 0 deletions etc/archive_notebooks.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit e364b40

Please sign in to comment.