介绍
可发表的prism点图
加载R包
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
library(tidyverse)
library(ggpubr)
library(ggprism)
rm(list = ls())
options(stringsAsFactors = F)
导入数据
data("iris")
head(iris)
处理数据
plotdata <- iris |>
dplyr::select(Sepal.Length, Species) |>
dplyr::mutate(Species = factor(Species, c("setosa", "versicolor", "virginica"))) |>
dplyr::rename(Group = Species,
Index = Sepal.Length)
head(plotdata)