Skip to content

Commit

Permalink
minor corrections ch 01 & 02
Browse files Browse the repository at this point in the history
added that install.packages should only be done in the console (ch 1);
ch1 - unzip screenshots made visible
ch2 - typo corrected
  • Loading branch information
gabymahrholz committed Sep 29, 2024
1 parent d9f1a8c commit 21bf6e6
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .Rproj.user/EEE9B81B/pcs/source-pane.pper
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"activeTab": 0
"activeTab": 2
}
4 changes: 2 additions & 2 deletions .quarto/_freeze/01-basics/execute-results/html.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .quarto/_freeze/02-wrangling/execute-results/html.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .quarto/cites/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"09-correlation.qmd":[],"09-simple-regression.qmd":[],"05-dataviz2.qmd":[],"07-apes.qmd":[],"11-one-way-anova.qmd":[],"11-multiple-regression.qmd":[],"06-paired.qmd":[],"08-paired.qmd":[],"appendix-c-exporting-server.qmd":[],"06-independent.qmd":[],"04-dataviz.qmd":[],"10-regression.qmd":[],"references.qmd":[],"04-dataviz2.qmd":[],"index.qmd":[],"13-factorial-anova.qmd":[],"01-basics.qmd":[],"08-correlation.qmd":[],"02-wrangling.qmd":[],"12-one-way-anova.qmd":[],"appendix-d-symbols.qmd":[],"10-multiple-regression.qmd":[],"03-wrangling2.qmd":[],"05-independent.qmd":[],"instructions.qmd":["usethis"],"03-dataviz.qmd":[],"appendix-a-installing-r.qmd":[],"appendix-x-How-to-cite-R.qmd":[],"07-independent.qmd":[],"06-chi-square-one-sample.qmd":[],"04-chi-square-one-sample.qmd":[],"appendix-b-updating-packages.qmd":[],"05-chi-square-one-sample.qmd":[],"12-factorial-anova.qmd":[],"webexercises.qmd":[],"07-paired.qmd":[],"appendix-y-license.qmd":[],"04-prob-binom-one-sample.qmd":[]}
{"05-independent.qmd":[],"01-basics.qmd":[],"07-apes.qmd":[],"12-factorial-anova.qmd":[],"03-dataviz.qmd":[],"03-wrangling2.qmd":[],"appendix-d-symbols.qmd":[],"08-paired.qmd":[],"09-simple-regression.qmd":[],"12-one-way-anova.qmd":[],"references.qmd":[],"index.qmd":[],"04-chi-square-one-sample.qmd":[],"06-independent.qmd":[],"06-chi-square-one-sample.qmd":[],"webexercises.qmd":[],"04-dataviz.qmd":[],"appendix-b-updating-packages.qmd":[],"appendix-x-How-to-cite-R.qmd":[],"11-multiple-regression.qmd":[],"13-factorial-anova.qmd":[],"02-wrangling.qmd":[],"appendix-a-installing-r.qmd":[],"07-paired.qmd":[],"04-dataviz2.qmd":[],"05-dataviz2.qmd":[],"04-prob-binom-one-sample.qmd":[],"appendix-y-license.qmd":[],"07-independent.qmd":[],"06-paired.qmd":[],"05-chi-square-one-sample.qmd":[],"instructions.qmd":["usethis"],"10-regression.qmd":[],"appendix-c-exporting-server.qmd":[],"11-one-way-anova.qmd":[],"10-multiple-regression.qmd":[],"08-correlation.qmd":[],"09-correlation.qmd":[]}
2 changes: 1 addition & 1 deletion .quarto/idx/01-basics.qmd.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .quarto/xref/5c23a141
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"headings":["intended-learning-outcomes","individual-walkthrough","r-and-r-studio","r-server","installing-r-and-rstudio-on-your-computer","settings-for-reproducibility","rstudio-panes","sec-project","sec-rmd","markdown","heading-levels","you-would-incorporate-this-into-your-text-as","and-it-will-be-displayed-in-your-knitted-html-file-as","unordered-and-ordered-lists","emphasis","sec-chunks","sec-download_data_ch1","activity-4-installing-packages-loading-packages-and-reading-in-data","installing-packages","loading-packages-and-reading-in-data","sec-familiarise","first-glimpse-at-the-data","sec-datatypes","variable-types","pair-coding","task-1-create-a-project-folder-for-the-lab-activities","task-2-create-a-new-.rmd-file","task-3-download-the-data","task-4-familiarise-yourself-with-the-data","test-your-knowledge","knowledge-check","question-1","question-2","question-3","question-4","error-mode","question-5","question-6","question-7","question-8","sec-basics"],"entries":[{"order":{"section":[1,0,0,0,0,0,0],"number":1},"key":"sec-basics"},{"order":{"section":[1,2,0,0,0,0,0],"number":1},"caption":"1.2 Activity 1: Creating a new project","key":"sec-project"},{"order":{"section":[1,6,2,0,0,0,0],"number":6},"caption":"1.6.2 Data types","key":"sec-datatypes"},{"order":{"section":[1,6,0,0,0,0,0],"number":5},"caption":"1.6 Activity 5: Familiarise yourself with the data","key":"sec-familiarise"},{"order":{"section":[1,3,2,0,0,0,0],"number":1},"caption":"Default .Rmd with highlighting - names in pink and knitr display options in purple","key":"fig-rmd"},{"order":{"section":[1,4,0,0,0,0,0],"number":4},"caption":"1.4 Activity 3: Download the data","key":"sec-download_data_ch1"},{"order":{"section":[1,3,0,0,0,0,0],"number":2},"caption":"1.3 Activity 2: Create a new R Markdown file","key":"sec-rmd"},{"order":{"section":[1,3,2,0,0,0,0],"number":3},"caption":"1.3.2 Code chunks","key":"sec-chunks"}],"options":{"chapter-id":"sec-basics","chapters":true}}
{"options":{"chapters":true,"chapter-id":"sec-basics"},"headings":["intended-learning-outcomes","individual-walkthrough","r-and-r-studio","r-server","installing-r-and-rstudio-on-your-computer","settings-for-reproducibility","rstudio-panes","sec-project","sec-rmd","markdown","heading-levels","you-would-incorporate-this-into-your-text-as","and-it-will-be-displayed-in-your-knitted-html-file-as","unordered-and-ordered-lists","emphasis","sec-chunks","sec-download_data_ch1","activity-4-installing-packages-loading-packages-and-reading-in-data","installing-packages","loading-packages-and-reading-in-data","sec-familiarise","first-glimpse-at-the-data","sec-datatypes","variable-types","pair-coding","task-1-create-a-project-folder-for-the-lab-activities","task-2-create-a-new-.rmd-file","task-3-download-the-data","task-4-familiarise-yourself-with-the-data","test-your-knowledge","knowledge-check","question-1","question-2","question-3","question-4","error-mode","question-5","question-6","question-7","question-8","sec-basics"],"entries":[{"key":"sec-basics","order":{"section":[1,0,0,0,0,0,0],"number":1}},{"key":"sec-chunks","order":{"section":[1,3,2,0,0,0,0],"number":3},"caption":"1.3.2 Code chunks"},{"key":"sec-rmd","order":{"section":[1,3,0,0,0,0,0],"number":2},"caption":"1.3 Activity 2: Create a new R Markdown file"},{"key":"sec-download_data_ch1","order":{"section":[1,4,0,0,0,0,0],"number":4},"caption":"1.4 Activity 3: Download the data"},{"key":"sec-familiarise","order":{"section":[1,6,0,0,0,0,0],"number":5},"caption":"1.6 Activity 5: Familiarise yourself with the data"},{"key":"fig-rmd","order":{"section":[1,3,2,0,0,0,0],"number":1},"caption":"Default .Rmd with highlighting - names in pink and knitr display options in purple"},{"key":"sec-datatypes","order":{"section":[1,6,2,0,0,0,0],"number":6},"caption":"1.6.2 Data types"},{"key":"sec-project","order":{"section":[1,2,0,0,0,0,0],"number":1},"caption":"1.2 Activity 1: Creating a new project"}]}
2 changes: 1 addition & 1 deletion .quarto/xref/7a0d69cd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"entries":[{"key":"sec-wrangling","order":{"section":[2,0,0,0,0,0,0],"number":1}},{"caption":"2.4 Activity 4: Questionable Research Practices (QRPs)","key":"sec-ch2_act4","order":{"section":[2,4,0,0,0,0,0],"number":1}}],"headings":["intended-learning-outcomes","individual-walkthrough","activity-1-setup","activity-2-load-in-the-libraries-and-read-in-the-data","activity-3-calculating-demographics","for-the-full-sample-using-summarise","fixing-age","computing-summary-stats","computing-summary-stats---third-attempt","per-gender-using-summarise-and-group_by","adding-percentages","sec-ch2_act4","the-main-goal-is-to-compute-the-mean-qrp-score-per-participant-for-time-point-1.","activity-5-knitting","activity-6-export-a-data-object-as-a-csv","pair-coding","task-1-open-the-r-project-you-created-last-week","task-2-open-your-.rmd-file-from-last-week","task-3-load-in-the-library-and-read-in-the-data","task-4-calculating-the-mean-for-flourishing_pre","test-your-knowledge-and-challenge-yourself","knowledge-check","question-1","question-2","question-3","question-4","question-5","error-mode","question-6","question-7","question-8","challenge-yourself","sec-wrangling"],"options":{"chapter-id":"sec-wrangling","chapters":true}}
{"options":{"chapters":true,"chapter-id":"sec-wrangling"},"entries":[{"key":"sec-wrangling","order":{"number":1,"section":[2,0,0,0,0,0,0]}},{"key":"sec-ch2_act4","caption":"2.4 Activity 4: Questionable Research Practices (QRPs)","order":{"number":1,"section":[2,4,0,0,0,0,0]}}],"headings":["intended-learning-outcomes","individual-walkthrough","activity-1-setup","activity-2-load-in-the-libraries-and-read-in-the-data","activity-3-calculating-demographics","for-the-full-sample-using-summarise","fixing-age","computing-summary-stats","computing-summary-stats---third-attempt","per-gender-using-summarise-and-group_by","adding-percentages","sec-ch2_act4","the-main-goal-is-to-compute-the-mean-qrp-score-per-participant-for-time-point-1.","activity-5-knitting","activity-6-export-a-data-object-as-a-csv","pair-coding","task-1-open-the-r-project-you-created-last-week","task-2-open-your-.rmd-file-from-last-week","task-3-load-in-the-library-and-read-in-the-data","task-4-calculating-the-mean-for-flourishing_pre","test-your-knowledge-and-challenge-yourself","knowledge-check","question-1","question-2","question-3","question-4","question-5","error-mode","question-6","question-7","question-8","challenge-yourself","sec-wrangling"]}
11 changes: 9 additions & 2 deletions 01-basics.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ The first step is to **unzip the zip folder** so that the files are placed withi
* Check the extracted files are placed next to the project icon
* Files and project should be visible in the Output pane in RStudio
::: {.callout-note collapse="true"}
::: {.callout-note collapse="false"}
## For screenshots click here
## Screenshots for "unzipping a zip folder"
::: {layout-ncol="1"}
Expand Down Expand Up @@ -432,6 +432,13 @@ If you try to load a package that has not been installed yet, you will receive a
To fix this, simply install the package first. **In the console**, type the command `install.packages("tidyverse")`. This **only needs to be done once after a fresh installation**. After that, you will be able to load the `tidyverse` package into your library whenever you open RStudio.
::: callout-important
## Install packages from the console only
Never include `install.packages()` in the Rmd. Only install packages from the console pane or the packages tab of the lower right pane!!!
:::
Note, there will be other packages used in later chapters that will also need to be installed before their first use, so this error is not limited to `tidyverse`.
Expand Down
2 changes: 1 addition & 1 deletion 02-wrangling.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ However, as you can see in the table above, each item is in a separate column, m
Let’s tackle this problem step by step. It’s best to create a separate data object for this. If we tried to compute it within `data_prp`, it could quickly become messy.


* **Step 1**: Select the relevant columns `Code`, and `QRPs_1_Time1` to `QRPs_1_Time1` and store them in an object called `qrp_t1`
* **Step 1**: Select the relevant columns `Code`, and `QRPs_1_Time1` to `QRPs_11_Time1` and store them in an object called `qrp_t1`
* **Step 2**: Pivot the data from wide format to long format using `pivot_longer()` so we can calculate the average score more easily (in step 3)
* **Step 3**: Calculate the average QRP score (`QRPs_Acceptance_Time1_mean`) per participant using `group_by()` and `summarise()`

Expand Down
4 changes: 2 additions & 2 deletions _freeze/01-basics/execute-results/html.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _freeze/02-wrangling/execute-results/html.json

Large diffs are not rendered by default.

Loading

0 comments on commit 21bf6e6

Please sign in to comment.