Ggplot troubleshoot: Error: Aesthetics must be either length 1 or the same as the data (24): x, y, fill

It looks like you got an answer to your question on Stack Overflow.

FYI, it's good practice to let folks know when you've cross-posted a question on multiple websites. See the FAQ for this site for more details: FAQ: Is it OK if I cross-post?