library(ggplot2)
library(tidyfst)
set.seed(19960822)
nr_of_rows = 1e4
data.frame(
Id = 1:1e4,
Journal = sample(LETTERS,nr_of_rows,replace = TRUE),
CiteCount = sample(1:100,nr_of_rows,replace = TRUE)
) -> journal_table
p_sie(journal_table,group = "Journal",
index = "CiteCount",to_compare = c("A","B","C")) -> p_sie_df
p_sie_df
p_sie_df %>%
ggplot(aes(p/100,sie,color = Journal)) +
geom_point() +
geom_line() +
geom_abline(slope = 1,linetype = "dashed") +
scale_x_continuous(labels = tidyfst::percent) +
scale_y_continuous(labels = tidyfst::percent) +
labs(x = "p",y = "SIE") +
theme_bw()
Run the code above in your browser using DataLab