项目作者: masato-ogishi

项目描述 :
Plot utilities
高级语言: R
项目地址: git://github.com/masato-ogishi/plotUtility.git
创建时间: 2017-12-10T02:40:48Z
项目社区:https://github.com/masato-ogishi/plotUtility

开源协议:MIT License

下载


Installation

  1. if(!require(devtools)) install.packages("devtools")
  2. devtools::install_github("masato-ogishi/plotUtility")

Usage

  1. library(tidyverse)
  2. library(ggpubr)
  3. library(plotUtility)
  4. data("ToothGrowth")
  5. df <- ToothGrowth
  6. plt <- ggboxplot(df, x = "dose", y = "len",
  7. color = "dose", palette =c("#00AFBB", "#E7B800", "#FC4E07"),
  8. add = "jitter", shape = "dose")
  9. my_comparisons <- list( c("0.5", "1"), c("1", "2"), c("0.5", "2") )
  10. plt <- plt + stat_compare_means(comparisons = my_comparisons) + stat_compare_means(label.y = 50)
  11. plt <- plt + theme_pubr(16)
  12. savePDF(plt, o="Plot.pdf", w=8, h=5)
  13. savePPTX(plt, o="Plot.pptx", w=8, h=5)