I\'m running cor() on a data.framewith all numeric values and I\'m getting this as the result:
cor()
data.frame
price exprice... price 1
very simple and correct answer
Tell the correlation to ignore the NAs with use argument, e.g.:
cor(data$price, data$exprice, use = "complete.obs")