variables in the dataset not found issues.

You might be trying to do the same exercise that was discussed in this thread: Unable to Substract two columns in R

There's some hints in this comment and a small example in this comment