Skip to content

Commit 2ff2a07

Browse files
committed
Remove .Rdata demonstration.
Feedback from UChicago tutorial was that it caused confusion. Also, need to shorten tutorial overall.
1 parent 46d9b5b commit 2ff2a07

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

analysis/challenge.Rmd

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,15 @@ steps:
3232

3333
The analysis purposefully contains various issues that make it difficult to
3434
reproduce. Open the file `spotify.Rmd` by clicking on it in the RStudio Files
35-
pane. In the Editor pane, click on "Run" and then click on "Run All" to execute
36-
all the code chunks in the R console (Ctrl/Cmd+Alt+Enter). Note that the code
37-
completes and produces a plot in the Plots pane.
38-
39-
Next click the Knit button to re-build the document. This time the code fails
40-
due to an error. The difference is because RStudio knits Rmd files in a clean
41-
R session. In contrast, the R session currently running in the R console already
42-
had all the analysis variables created because the workspace was restored. This
43-
is why you want to avoid saving your workspace: it can make it appear that your
44-
code is running when it is actually contains errors. In fact, if you scroll
45-
back up through the R console history, you'll see that some errors did occur.
46-
But the analysis still completed since the intermediate objects were already
47-
available.
48-
49-
To fix the workspace issue, first go to the Files pane and delete the file
50-
`.RData` that contains the saved workspace. Second, go to "Tools" -> "Global
51-
Options...". Unclick the checkbox "Restore .RData into workspace at startup" and
52-
change the dropdown "Save workspace to to .RData on exit" to Never.
53-
54-
![](assets/rstudio-workspace.png)
55-
56-
Now you can proceed to fix the analysis one error at a time. Click on Knit to
57-
produce the first error. Then click on "Output" to see the lines in the Rmd
35+
pane.
36+
37+
Next click the Knit button to re-build the document. The code fails
38+
due to an error. Click on "Output" to see the lines in the Rmd
5839
file where the error occurred.
5940

41+
Working together in small groups, reproduce the analysis by fixing the errors.
42+
Below are hints on how to fix each error you will find.
43+
6044
## File paths
6145

6246
The first error you will encounter is below:

docs/assets/rstudio-workspace.png

-91 KB
Binary file not shown.

0 commit comments

Comments
 (0)