R: Plot: Re-arranging the order of variables

前端 未结 1 707
自闭症患者
自闭症患者 2020-12-12 07:12

I want to create a barplot in R. However, I would like to re-arrange the variables on the x-axis, not by frequency but by \'meaning\'.

Imagine I have the following

1条回答
  •  被撕碎了的回忆
    2020-12-12 07:23

    We can use factor with levels specified

    plot(factor(df$Radio, levels=c("C", "E", "B", "A", "D", "F")))
    

    0 讨论(0)
提交回复
热议问题