I just started using R. I am supposed to Calculate a new variable “Vehic_vol” from the sum of “Psgr_Vol” and “Lugg_Vol” and Plot this new variable against “CITY_MPG” for the whole data set but I end up with 'x' and 'y' lengths differ ERROR! Any thoughts?
Here is what I did:
Vehic_vol<-(VehicleData$Psgr_Vol + VehicleData$Lugg_Vol)
plot (VehicleData$Vehic_vol, VehicleData$CITY_MPG)
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ