#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
avgRankPath = function(df.path) {
aux = lapply(1:nrow(df.path), function(i) {
elem = df.path[i,]
return(rank(-elem[-1]))
})
df = data.frame(do.call("rbind", aux))
df = cbind(1:900, df)
colnames(df)[1] = "id"
return(df)
}
#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
avgLossPath = function(df.path) {
aux = lapply(1:nrow(df.path), function(i) {
elem = df.path[i,]
return(1-elem[-1])
})
df = data.frame(do.call("rbind", aux))
df = cbind(1:900, df)
colnames(df)[1] = "id"
return(df)
}
#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.