阅读背景:

如何将因子水平设置为它们在数据框中出现的顺序?

来源:互联网 

I want to create a heat map using ggplot however I want to order the y-axis by the number of observations. I order the dataframe by the column N and add the number of observations to the group name so that it appears in the axis label. When I plot the data it re-orders based on the group name. Is there a way to set factor levels based on the order they appear in the data frame? I want to create a heat map using ggplot howeve




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: