Help needed: non-numeric argument to binary operator

It is always a good idea to have a reproducible example. It helps us help you. Here you can read more about how to do it:

That being said, in your case I'm pretty sure the problem is that your column name (specifically, opt-out rate) is not a valid name, so R is getting confused.

To fix this, you can do the following:

  1. Change names of the column with, e.g., make.names function in base R.
  2. Use the name, but put it in backticks:
Figure1$`opt-out rate`
3 Likes