Knitr Not Recognizing Calculated Variable

I greeted a new column in a chunk:
GDPPerCap <- GDP / Population
The chunk works. The variable has been created.
When I attempt to knit the code, I see this:
Assigned data must be compatible with existing data,
Please advise.

We really need to see your code and data. Have a look at

for some suggestions.