beanumber / baseball_R

Companion to Analyzing Baseball Data with R, 2nd edition
95 stars 62 forks source link

error message I don't understand #8

Closed Rmunter closed 10 months ago

Rmunter commented 4 years ago

Hi I'm working my way through Analyzing Baseball with R. When working on the Chapter 2 first exercise, I'm getting the following error message even after typing straight from the answer given here (which is what I had done in the first place). What am I doing wrong?

SB.Attempt = SB + CS Error in SB + CS : non-numeric argument to binary operator

beanumber commented 4 years ago

It's hard to say without seeing what is in your R session. But in order for this to work, you have to have numeric vectors called SB and CS in your global environment.