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
{{ message }}
Repository navigation
Shiny code 002, 003, and 004 Errors with running regression and incorrect argument format #36
I have been enjoying learning Shiny and R programming, and have appreciated your YouTube videos, and I am struggling with episodes 2-4 (and the associated Code on your github) and I'm not sure where to go to remedy the issue.
In each of the code files provided, I attempt to Run the code and get the following errors:
Error in y - ymean : non-numeric argument to binary operator
In addition: Warning messages:
1: In randomForest.default(m, y, ...) :
The response has five or fewer unique values. Are you sure you want to do regression?
2: In mean.default(y) : argument is not numeric or logical: returning NA
Do you know where I might be able to go, or what resources there are, for me to remedy these errors so that I can continue to learn and apply the knowledge you've shared on these tutorials? So far, I haven't been able to get very far due to these persistent errors spanning each of the R files.
Activity
nvavrock commentedon Jan 26, 2026
#Read data, at first I got an error message stating,
#Error in y - ymean : non-numeric argument to binary operator
#Until I put in line 20 and lines 23-25. Fixed bug.
weather <- read.csv(
text = getURL("https://raw.githubusercontent.com/dataprofessor/data/master/weather-weka.csv"),
stringsAsFactors = FALSE
)
weather$play <- as.factor(weather$play)
weather$outlook <- as.factor(weather$outlook)
weather$windy <- as.factor(weather$windy)
That bug is fixed, but now Status/Output only says "Calculation Complete", but doesn't show the percent of yes or no
nvavrock commentedon Jan 26, 2026
I fixed the app, 003-play-golf:
fixed-app-file.md