Open tylerisyoung opened 4 years ago
From what I can tell, teams_sals is not the salary column in your merged data frame. I bet if you divide w by 'salary', it will work. Good luck!
@MelDawg may be onto something! Thanks for stepping in and up.
@tylerisyoung - what is your error message telling you? When you see non-numeric argument
in an error message, most times this means that some value (or variable containing multiple values) you are passing to a function is supposed to be of class "numeric". Your error, then, tells you that it's not of class "numeric".
When this is the case, inspect the values individually. What does W
look like? What does team_sals
look like? Are they both numeric? If not, are they the right variables? If so, what do you need to do to make them numeric?
Let us know if you've got this figured out!
After having merged the two datasets with: teams_sals <- left_join(Teams, total_sal)
I am stuck on the next question. I have been using variations of:
teams_sals%>% mutate(Salary_CPW = (teams_sals / W)/100000)
I was hoping to use "Salary_CPW" as a new variable/column with the resulting values from the equation but continue getting the error: Error: Problem with
mutate()
inputSalary_CPW
. x non-numeric argument to binary operator InputSalary_CPW
is #(teams_sals/W)/100000
.I understand that they're different data types that I'm trying to manipulate, but I am not sure what I should do to fix this. I've recovered all of the material but have still be stuck here for a while now and feel that it's an easy thing to correct, this comment may be a bit late for help in the current lab, but anything helps.
Thanks,