#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
scaleMatrix = function(mat) {
best = lapply(1:nrow(mat), function(i){
ids = which(!is.na(mat[i,]))
return(max(mat[i, ids]))
})
df = data.frame(do.call("rbind", best))
aux = lapply(1:nrow(mat), function(i){
line = mat[i,] / best[i]
return(line)
})
tasks = data.frame(do.call("rbind", aux))
return(tasks)
}
#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.