You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,7 +44,7 @@ Reproducible studies allow other researchers to perform the same processes and a
44
44
- The researchers can't find some of the data they used to generate the original results and can't figure out which parameters they used when running their analyses.
45
45
- The manuscript is still languishing in the drawer…
46
46
47
-
According to the [U.S. National Science Foundation (NSF)](https://www.nsf.gov/sbe/AC_Materials/SBE_Robust_and_Reliable_Research_Report.pdf) subcommittee on replicability in science (2015):
47
+
According to the [U.S. National Science Foundation (NSF)](https://rcra.emory.edu/_includes/documents/sections/oric/8-social-behavioral-and-economic-sciences-perspectives-on-robust-and-reliable-science.pdf) subcommittee on replicability in science (2015):
48
48
49
49
Science should routinely evaluate the reproducibility of findings that enjoy a prominent role in the published literature. To make reproduction possible, efficient, and informative, researchers should sufficiently document the details of the procedures used to collect data, convert observations into analyzable data, and perform data analysis.
50
50
@@ -93,16 +93,16 @@ Let's assume I have convinced you that reproducibility and transparency are in y
93
93
94
94
From day one and throughout the whole research life cycle! Before starting the project, you might have to learn tools like R or Git. If you wait too long while doing the analysis, you might lose a lot of time trying to remember what you did two months ago. When you write the paper, you want up-to-date numbers, tables, and figures. When you co-author a paper, you want to make sure that the analyses presented in a paper with your name on it are sound. When you review a paper, you can't judge the results if you don't know how the authors got there.
95
95
96
-
[Alexander (2022)](https://tellingstorieswithdata.com/) suggests three steps towards better reproducibility:
96
+
[Alexander (2023)](https://rohanalexander.github.io/telling_stories-published) argues that reproducibility often starts out as a burden—something others require of you, and it can feel tedious or frustrating. But that perception usually changes the moment you return to a project after some time away. Then, it becomes clear that reproducibility isn’t just essential for advancing data science—it’s also a practical tool that makes your own work easier to understand and build upon later. To achieve reproducibility, the author suggests a three-step approach:
97
97
98
98
1) Ensure the entire workflow is documented. This may involve addressing questions such as:
99
99
100
100
- How was the raw dataset obtained, and is access likely to be persistent and available to others?
101
-
- What specific steps are being taken to transform the raw data in the data that were analyzed, and how can this be made available to others?
101
+
- What specific steps are being taken to transform the raw data into the data that was analyzed, and how can this be made available to others?
102
102
- What analysis has been done, which codes/scripts were used, and how can this be shared clearly?
103
103
- How has the final paper or report been built, and to what extent can others follow that process themselves?
104
104
105
-
2) Try to accomplish progressively the following requirements:
105
+
2) Try to progressively accomplish the following requirements:
106
106
107
107
- Can you run your entire workflow again?
108
108
- Can another person run your entire workflow again?
@@ -139,7 +139,7 @@ RStudio has a handy "Environment" window, which shows all of the objects you hav
139
139
140
140
### Makes it easy to set your working directory and access files on your computer
141
141
142
-
With RStudio, you can navigate to folders on your computer in the "Files" window, view any files you have in that folder, or go to your working directory. You can create projects that help you set your working directory and work with relative paths"to external" files (such as input data and figures) so it can also be used on other machines.
142
+
With RStudio, you can navigate to folders on your computer in the "Files" window, view any files you have in that folder, or go to your working directory. You can create projects that help you set your working directory and work with relative pathsto external files (such as input data and figures), so it can also be used on other machines.
143
143
144
144
### Integrates with collaboration and publishing tools
145
145
@@ -162,7 +162,7 @@ Developers picked a name that had meaning in the history of publishing and lande
162
162
163
163
## Why Quarto and not R Markdown?
164
164
165
-
As noted before, Quarto is the next generation of R Markdown, which was the subject of a previous workshop [see Reproducible Publications with RStudio](https://github.com/carpentries-incubator/Reproducible-Publications-with-RStudio)and the anatomy of `.rmd` and `.qmd` files are very similar. So why move to Quarto? While compatible with Python (and bash, Julia, C, SQL), R Markdown was designed primarily for R users. **Quarto does not require R.**Quarto runs computations into separate pluggable language "engine," which helps make this cross-language functionality easier to support and reduces infrastructure intensity with built-in applications. In addition, because Quarto is designed to be compatible with existing formats, you can render most existing `.Rmd` and Jupyter Notebooks with Quarto without modification. This low-pain process helps the transition to Quarto.
165
+
As noted before, Quarto is the next generation of R Markdown, and the anatomy of `.rmd` and `.qmd` files is very similar. So why move to Quarto? While compatible with Python (and bash, Julia, C, SQL), R Markdown was designed primarily for R users. **Quarto does not require R.**It supports multiple languages by delegating code execution to external engines, such as Jupyter for Python and Julia, or knitr for R. This design helps support cross-language workflows and reduces infrastructure dependencies. In addition, because Quarto is designed to be compatible with existing formats, you can render most existing `.Rmd` and Jupyter Notebooks in Quarto without modification. This helps ease the transition to Quarto.
@@ -175,7 +175,7 @@ Nitsch, F. J., Sellitto, M., \& Kalenscher, T. (2021). Trier social stress test
175
175
176
176
We will also be using a simplified version of the project directory containing data files and scripts published by the authors on Open Science Framework: <https://doi.org/10.17605/OSF.IO/6MVQ7>.
177
177
178
-
The adapted paper template and project directory are used exclusively for instruction purposes with permission from the authors.
178
+
The adapted paper template and project directory are used exclusively for instructional purposes with permission from the authors.
Copy file name to clipboardExpand all lines: episodes/01-repro-project-org/02-reproducibility.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ The three principles of file naming are:
166
166
- i.e. `CC-101_1_data.csv`
167
167
- i.e. `CC-101_2_data.csv`
168
168
169
-
Adapted from [https://datacarpentry.org/rr-organization1/01-file-naming/index.html](https://datacarpentry.org/rr-organization1/01-file-naming/index.html). For more tips on file naming, check: [The Dos and Don'ts of File Naming](https://www.library.ucsb.edu/sites/default/files/dls-n01-2021-filenaming.pdf).
169
+
Adapted from [https://datacarpentry.org/rr-organization1/01-file-naming/index.html](https://datacarpentry.org/rr-organization1/01-file-naming/index.html). For more tips on file naming, check: [The Dos and Don'ts of File Naming](https://perma.cc/9YGZ-D3J5).
170
170
171
171
> ## Challenge 2: File name syntax
172
172
>
@@ -238,7 +238,7 @@ Anything generated by your scripts should be treated as disposable: it should al
238
238
There are lots of different ways to manage this output. Having an output folder with different sub-directories for each separate analysis makes it easier later. Since many analyses are exploratory and aren’t used in the final project, some of the analyses get shared between projects.
239
239
240
240
#### **Include a README file**
241
-
For more information about the README file and a customizable template, check this [handout](https://www.library.ucsb.edu/sites/default/files/dls-n03-2021-readme-navy.pdf). Make sure to include citation and license information both for your data [see creative commons license]([https://creativecommons.org/licenses/) and software ([see license types on Github](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)). This information will be critical for others to reuse and correctly attribute your work. You may also consider adding a separate citation and license file to your project folder.
241
+
For more information about the README file and a customizable template, check this [handout](https://perma.cc/A5PN-YF7Z). Make sure to include citation and license information both for your data [see creative commons license]([https://creativecommons.org/) and software ([see license types on Github](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)). This information will be critical for others to reuse and correctly attribute your work. You may also consider adding a separate citation and license file to your project folder.
242
242
243
243
Again, there are no hard and fast rules here, but remember, keeping your raw data files separate is important to ensure they don’t get overwritten after you use a script to clean your data. It’s also very helpful to keep the different files generated by your analysis organized in a folder.
Copy file name to clipboardExpand all lines: episodes/02-quarto/01-basic-rstudio.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ This lesson assumes you already have a basic understanding of R and RStudio but
32
32
we will do a brief tour of the IDE, review R projects, and the best practices for
33
33
organizing your work, and how to install or check packages you need to follow along.
34
34
35
-
Now, let's open RStudio. You may access it through the Jupyter Hub instance [https://carpentryworkshop.lsit.ucsb.edu](https://carpentryworkshop.lsit.ucsb.edu). After passing authentication, choose `RStudio`. If you want to follow along using your local RStudio, make sure you use IDE version RStudio v2023.06 or later and that it is running [Quarto version 1.4 or above](https://quarto.org/docs/download/prerelease.html). If you need to check that, for RStudio, choose `Help` and `About RStudio`. For the Quarto version checking, type in `packageVersion("quarto")` on the console.
35
+
Now, let's open RStudio. After passing authentication, choose `RStudio`. If you want to follow along using your local RStudio, make sure you use IDE version RStudio v2023.06 or later and that it is running [Quarto version 1.4 or above](https://quarto.org/docs/download/release.html). If you need to check that, for RStudio, choose `Help` and `About RStudio`. For the Quarto version checking, type in `packageVersion("quarto")` on the console.
36
36
37
37
38
38
**Basic layout**
@@ -73,7 +73,7 @@ Click an empty box to load that package and click a checked box to detach that
73
73
package.
74
74
75
75
Packages can be installed and updated from the Package tab with the *Install* and
76
-
*Update* buttons at the top of the tab. We have asked you to install a few packages prior to the workshop following the [setup instructions](https://github.com/UCSBCarpentry/Reproducible-Publications-with-RStudio/blob/main/setup.md) using the `install.packages()` command. Let's now make sure you have all of them good to go.
76
+
*Update* buttons at the top of the tab. We have asked you to install a few packages prior to the workshop following the setup instructions using the `install.packages()` command. Let's now make sure you have all of them good to go.
77
77
78
78
> ## CHALLENGE 1 - Checking for Installed Packages
79
79
> Which command would you use to check for packages ready for use?
Copy file name to clipboardExpand all lines: episodes/02-reproducibility.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ The three principles of file naming are:
187
187
- i.e. `CC-101_1_data.csv`
188
188
- i.e. `CC-101_2_data.csv`
189
189
190
-
Adapted from <https://datacarpentry.org/rr-organization1/01-file-naming/index.html>. For more tips on file naming, check: [The Dos and Don'ts of File Naming](https://www.library.ucsb.edu/sites/default/files/dls-n01-2021-filenaming.pdf).
190
+
Adapted from <https://datacarpentry.org/rr-organization1/01-file-naming/index.html>. For more tips on file naming, check: [The Dos and Don'ts of File Naming](https://perma.cc/9YGZ-D3J5).
191
191
192
192
::::::::::::::::::::::::::::::::::::::: challenge
193
193
@@ -253,10 +253,11 @@ What would be the relative path needed to refer to the file `bronars_simulation_
> We just discussed how relative paths are a better practice when coding because we can guarantee our code will work on somebody else's system. However, relative paths can still be quite confusing to deal with, especially when you have many sub-directories in your project. One way to make things a bit easier on ourselves is to make sure the part that's *relative* to what we're referencing is always the same.
259
-
> This is where using the `RStudio Project` can help. When you create a Project in RStudio, in the background, RStudio will automatically create a "root" folder and set it as your working directory in R. Since in R relative paths are relative to your working directory, this will ease referring to external input or output files (data, images, plots, ...) in a consistent manner across your project by always having your relative paths relative to the top level folder and help to encapsulate your work within this folder. So with an Rproject setup, the relative path in the previous example will now be:
256
+
##### **Level up your relative paths**
257
+
258
+
We’ve just discussed how using relative paths is a better practice in coding, as it helps ensure that our code works consistently across different systems. However, relative paths can still be quite confusing to deal with, especially when you have many sub-directories in your project. One way to make things a bit easier on ourselves is to make sure the part that's *relative* to what we're referencing is always the same.
259
+
260
+
This is where using the `RStudio Project` can help. When you create a Project in RStudio, in the background, RStudio will automatically create a "root" folder and set it as your working directory in R. Since in R relative paths are relative to your working directory, this will ease referring to external input or output files (data, images, plots, ...) in a consistent manner across your project by always having your relative paths relative to the top level folder and help to encapsulate your work within this folder. So with an Rproject setup, the relative path in the previous example will now be:
260
261
261
262
```
262
263
df <- read.csv("data/foodchoice_budgetlines.csv")
@@ -275,7 +276,7 @@ There are lots of different ways to manage this output. Having an output folder
275
276
276
277
#### **Include a README file**
277
278
278
-
For more information about the README file and a customizable template, check this [handout](https://www.library.ucsb.edu/sites/default/files/dls-n03-2021-readme-navy.pdf). Make sure to include citation and license information both for your data [see creative commons license]([https://creativecommons.org/licenses) and software ([see license types on Github](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)). This information will be critical for others to reuse and correctly attribute your work. You may also consider adding a separate citation and license file to your project folder.
279
+
For more information about the README file and a customizable template, check this [handout](https://perma.cc/A5PN-YF7Z). Make sure to include citation and license information both for your data [see creative commons license](https://creativecommons.org/share-your-work/cclicenses/) and software ([see license types on Github](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)). This information will be critical for others to reuse and correctly attribute your work. You may also consider adding a separate citation and license file to your project folder.
279
280
280
281
Again, there are no hard and fast rules here, but remember, keeping your raw data files separate is important to ensure they don't get overwritten after you use a script to clean your data. It's also very helpful to keep the different files generated by your analysis organized in a folder.
Copy file name to clipboardExpand all lines: episodes/03-basic-rstudio.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ This lesson assumes you already have a basic understanding of R and RStudio but
35
35
we will do a brief tour of the IDE, review R projects, and the best practices for
36
36
organizing your work, and how to install or check packages you need to follow along.
37
37
38
-
Now, let's open RStudio. You may access it through the Jupyter Hub instance <https://carpentryworkshop.lsit.ucsb.edu>. After passing authentication, choose `RStudio`. If you want to follow along using your local RStudio, make sure you use IDE version RStudio v2023.06 or later and that it is running [Quarto version 1.4 or above](https://quarto.org/docs/download/prerelease.html). If you need to check that, for RStudio, choose `Help` and `About RStudio`. For the Quarto version checking, type in `packageVersion("quarto")` on the console.
38
+
Now, let's open RStudio. After passing authentication, choose `RStudio`. If you want to follow along using your local RStudio, make sure you use IDE version RStudio v2023.06 or later and that it is running [Quarto version 1.4 or above](https://quarto.org/docs/download/release.html). If you need to check that, for RStudio, choose `Help` and `About RStudio`. For the Quarto version checking, type in `packageVersion("quarto")` on the console.
39
39
40
40
**Basic layout**
41
41
@@ -74,7 +74,7 @@ Click an empty box to load that package and click a checked box to detach that
74
74
package.
75
75
76
76
Packages can be installed and updated from the Package tab with the *Install* and
77
-
*Update* buttons at the top of the tab. We have asked you to install a few packages prior to the workshop following the [setup instructions](https://github.com/UCSBCarpentry/Reproducible-Publications-with-RStudio/blob/main/setup.md) using the `install.packages()` command. Let's now make sure you have all of them good to go.
77
+
*Update* buttons at the top of the tab. We have asked you to install a few packages prior to the workshop following the setup instructions using the `install.packages()` command. Let's now make sure you have all of them good to go.
Copy file name to clipboardExpand all lines: episodes/03-collaboration/04-publishing-your-project.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ Quarto offers some journal formats and made them available within the quarto-jou
121
121
122
122
This list is expected to grow rapidly with new contributions submitted to the [Quarto Journal Templates Repository](https://github.com/quarto-journals). You may also create your own templates following [these guidelines](https://quarto.org/docs/journals/templates.html).
123
123
124
-
Journal templates require features of Quarto version 1.2, so we must ensure we have the right version. You can check your Quarto version in the Terminal with the command: `quarto --version`. We should be good with that for this workshop, but if you are using a lab computer later on, you may need to update Quarto. See: [pre-release versions of Quarto](https://quarto.org/docs/download/prerelease.html)
124
+
Journal templates require features of Quarto version 1.2 or later, so we must ensure we have the right version. You can check your Quarto version in the Terminal with the command: `quarto --version`. We should be good with that for this workshop, but if you are using a lab computer later on, you may need to update Quarto. See: [release versions of Quarto](https://quarto.org/docs/download/release.html)
125
125
126
126
Quarto uses a template command that can be called in the terminal to create an article in any of these formats. Suppose you want to use the Elsevier template. In Rstudio, in the terminal (if not showing, select `Tools > Terminal > New`), type `quarto use template quarto-journals/elsevier`. Then, follow the steps below:
0 commit comments