R "stat_compare_means" pairwaise comparison
0
0
Entering edit mode
23 months ago
MSRS ▴ 580

Hi, I am trying to solve the problem of

stat_compare_means

The source code here

lev <- levels(div_df_melt$Location) # get the variables

L.pairs <- combn(seq_along(lev), 2, simplify = FALSE, FUN = function(i) lev[i])

pval <- list(
  cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 0.1, 1),
  symbols = c("****", "***", "**", "*", "n.s")
)

p2 <- p + stat_compare_means(
  comparisons = L.pairs,
  label = "p.signif",
  symnum.args = list(
    cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 0.1, 1),
    symbols = c("****", "***", "**", "*", "n.s")
  )
)

print(p2)

But lev <- levels(div_df_melt$Location) # get the variables

L.pairs <- combn(seq_along(lev), 2, simplify = FALSE, FUN = function(i) lev[i])

didn't work properly.

Your assistance is highly appreciated.

R • 544 views
ADD COMMENT

Login before adding your answer.

Traffic: 2222 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6