0

使用 ggpubr 运行以下命令时,我收到错误

“f(...) 中的错误:只能处理在 x 轴上绘制的组的数据”

my_comparisons <- list( c('A_1538_C', '1594delete12') )
ggplot(dt) +
geom_jitter(width = 0.1, height = 0, aes(
    x=reorder(allele,mu_normal),
    y=mu_normal)) + 
  theme_bw() +
  theme(axis.text.x = element_text(angle =60, vjust = 1, hjust=1)) +
  stat_compare_means(comparisons = my_comparisons, method = "t.test")

stat_compare_means在我的另一个情节中运行,当 x 是项的交互时,这不是其他人遇到的问题。(有关该问题的详细信息:https ://github.com/const-ae/ggsignif/issues/16 )

的价值

unique(dt$allele)

[1] A_1714_C     C_1721_A     G_1546_T     A_443_T      C_1535_T     A_1538_C    
[7] 1594delete12 rpoB_1547A.G rpoB_1534T.C WT           rpsL_128A.G  rpsL_263A.G 
[13] gyrA_248C_T 
15 Levels: 1594delete12 A_1538_C A_1714_C A_443_T blank C_1535_T ... rpsL_263A.G

所以看起来像是my_comparisons一组现有的术语?(我想在它工作时进行更多比较)

4

0 回答 0