File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,26 @@ The function `read.csv()` is unable to open the data file. What's wrong with the
56
56
path to the file? Apply what you know about absolute and relative paths to
57
57
update the path and re-run the analysis.
58
58
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
+
59
79
## Missing package
60
80
61
81
The next error you encounter is:
You can’t perform that action at this time.
0 commit comments