how to make single stacked bar chart in ggplot2
问题 Ancestry <- data.frame(Race = c("European", "African American", "Asian", "Hispanic", "Other"), Proportion = c(40, 30, 10, 15, 5)) Ancestry %>% ggplot(aes(y = Proportion, fill = Race)) + geom_bar(stat="identity", colour="white") Running the above code gives me the following error: Warning in min(x, na.rm = na.rm) : no non-missing arguments to min; returning Inf Warning in max(x, na.rm = na.rm) : no non-missing arguments to max; returning -Inf Warning in min(diff(sort(x))) : no non-missing