Is this closer to what you want?
padr<-structure(list(Method1= c(0.343394182514031, 1, 0.860087696840587,
0.860087696840587, 0.868085451239441, 0.698055447477473, 0.43737803420133,
0.434970400304271, 0.434970400304271, 0.379233994071699),
Method2 = c(1,
0.232979733215734, 0.240392548713602, 0.240392548713602, 0.213384133751235,
0.240137915565427, 0.321393780370283, 0.322481353908317, 0.322481353908317,
0.352233249467427),
Method3 = c(1, 0.214432400448801, 0.214809476505306,
0.214809476505306, 0.16783443847331, 0.210797750473198, 0.293103343189013,
0.293692283587016, 0.293692283587016, 0.281085590908947),
Method4 = c(0,
1, 0.875556823046433, 0.875556823046433, 0.891768819029077, 0.832271929255291,
0.741168314099481, 0.740578512687553, 0.740578512687553, 0.819053554576837
)),
class = "data.frame", row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"))
library(purrr)
library(dplyr)
METHODS <- c("last","first","first","last")
COEF <- c(-1,1,1,-1)
RankFunc <- function(R,Meth,Coef){
length(R) + 1 - rank(Coef * R, ties.method = Meth)
}
pmap_dfc(list(padr, METHODS, COEF), RankFunc) |>
summarise(across(Method1:Method4, ~cor.test(., Method1, method = "spearman")$estimate))
#> # A tibble: 1 x 4
#> Method1 Method2 Method3 Method4
#> <dbl> <dbl> <dbl> <dbl>
#> 1 1 0.927 0.806 0.927
Created on 2022-07-20 by the reprex package (v2.0.1)