search for: dftmp

Displaying 1 result from an estimated 1 matches for "dftmp".

Did you mean: iftmp
2010 Apr 23
0
A distance measure between top-k list
...al's - measure of distance here is the code topklist <- function(df1,df2,matchby="name",rankby="pat",p=0.5, normalize=TRUE){ library(gtools) df1$rank <- rank(-df1[,rankby],ties.method="first") df2$rank <- rank(-df2[,rankby],ties.method="first") dftmp <- merge(df1,df2,matchby,all=TRUE) rownames(dftmp) <- dftmp[,matchby] df <- combinations(length(dftmp[,matchby]),2 ,as.character(dftmp[,matchby])) concor <- function(x,dftmp,p){ a <- NA n <- sum(as.numeric(!is.na(dftmp$rank.x))) x <- dftmp[c(x[1],x[2]),c("rank.x",&quo...