Skip to content

Commit 329ac65

Browse files
committed
Remove the undefined variable challenge.
From the UChicago tutorial, this one took the longest. This was in part due to the fact that I used the wrong Rmd, and thus the required information was only in the HTML. Most participants tried debugging the Rmd directly without consulting the HTML.
1 parent 2ff2a07 commit 329ac65

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

analysis/challenge.Rmd

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,6 @@ The function `read.csv()` is unable to open the data file. What's wrong with the
5656
path to the file? Apply what you know about absolute and relative paths to
5757
update the path and re-run the analysis.
5858

59-
## Undefined variable
60-
61-
The next error you encounter is:
62-
63-
```
64-
Quitting from lines 28-31 (spotify.Rmd)
65-
Error in sample.int(length(x), size, replace, prob) :
66-
object 'numTrainingSamples' not found
67-
Calls: <Anonymous> ... withVisible -> eval -> eval -> sample -> sample.int
68-
Execution halted
69-
```
70-
71-
It looks like the variable `numTrainingSamples` isn't defined in the Rmd file.
72-
This error often occurs when a variable is interactively created in the R
73-
console, but you forget to define it in the script.
74-
75-
The training set should contain 3/4 of the samples. Can you define the variable
76-
`numTrainingSamples`? Hint: You can obtain the number of samples with
77-
`nrow(spotify)`.
78-
7959
## Missing package
8060

8161
The next error you encounter is:

0 commit comments

Comments
 (0)