How to make an overall boxplot alongside factors in R?

痞子三分冷 提交于 2019-12-04 19:34:33

This is certainly not the most elegant way to solve it, but it works:

  1. Copy your dataset into a new object.
  2. Within the new object, replace the content of the variable containing the factors with the label you would like, for instance, "Total".
  3. Use rbind to attach the old and new objects together and attribute the result to the new object.
  4. In ggplot replace the old object by the new object.

I had the same issue, couldn't find an answer and proceeded this way.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!