View difference between Paste ID: Uh5qY0dr and hvHTQaaZ
SHOW: | | - or go back to the newest paste.
1-
comparison.pvalue <- function(index1, index2){
1+
comparison.pvalue <- function(method1, method2){
2-
  if (index1 != index2){
2+
	if (method1 == method2) {
3-
    for (i in 1:length(index.rank.dunn.test$comparisons)){
3+
		return 1
4-
      if ((index1 %in% index.rank.dunn.test$comparisons[i]) &
4+
	}
5-
          (index2 %in% index.rank.dunn.test$comparisons[i])){
5+
6-
        j <- i
6+
	for (i in 1:length(index.rank.dunn.test$comparisons)){
7-
      }
7+
		if ((method1 %in% index.rank.dunn.test$comparisons[i]) &
8-
    }
8+
			(method2 %in% index.rank.dunn.test$comparisons[i])
9-
    # i <- which(str_detect(index.rank.dunn.test$comparisons, index1) &
9+
		) {
10-
    #              str_detect(index.rank.dunn.test$comparisons, index2))
10+
			p.value <- index.rank.dunn.test$P.adjusted[i]
11-
    p.value <- index.rank.dunn.test$P.adjusted[j]
11+
			continue
12-
  } else{
12+
		}
13-
    p.value <- 1
13+
	}
14-
  }
14+
15-
  
15+
	return(p.value)
16-
  output <- p.value
16+