I\'m trying to make a graph to depict a population over a period of time. However, the dates are not in chronological order. In the imported CSV the dates are all correct an
If your dates are imported in the correct order in the data frame, use
sumc$Date <- factor(sumc$Date, ordered = T)
prior to plotting. This will make them as ordered factors based on the order they appear, and ggplot will understand that it has to keep them that way.
Edit: if the dates are not ordered, you can order them and save to a vector:
dates <- unique(sort(sumc$Date))
sumc$Date <- factor(sumc$Date, labels = dates, ordered = T)