I am needing some major help in understanding an issue of mine: I am combining/merging two datasets and in turn, I am trying to create a histogram of one of the elements that both datasets contain. However, I receive an error saying "Error in hist.default(SalePrice) : invalid number of 'breaks'".
As a background of the data, both datasets have "SalePrice" values for homes in different locations. I wanted to merge these datasets to reflect the differences in sale prices alone and then combine them to show differences after the combination. Does anyone have any suggestions?
They both have all the same attributes, with the exception of the datasets resembling another geographical location. I am only interested in the sale price and am trying to combine the sale prices together to display a histogram.
I can't conveniently quote and comment on your code as its an image.
But I will say when you arent confident coding, you shouldnt skip steps, be as methodical as possible.
Attaching the result of a merge and then assuming you know what the results would be is an example I think...
Why not merge and assign the merge to a named object. Then investigate / check that object is how you expect. I would guess that the columns share sale price name so one is relabeled with .x and other with .y so then the call to hist would fail as there is no such variable as named.