Commit 7f67a8b6 authored by Sylvain Falala's avatar Sylvain Falala
Browse files

fix bug of weight matrix

parent d2c177de
......@@ -648,16 +648,25 @@ server <- function(input, output, session) {
weightMat <- as.matrix(hot_to_r(input$rhWeightTable))
weightMat[indCol,indRow] <- 1.0/weightMat[indRow,indCol]
tempMatrix <- rv$weightMatrix
rv$weightMatrix <- weightMat
tempMatrix[indRow,indCol] <- weightMat[indRow,indCol]
tempMatrix[indCol,indRow] <- 1.0/tempMatrix[indRow,indCol]
resmat <- try(compute_weights(weightMat))
#print(tempMatrix)
rv$weightMatrix <- tempMatrix
resmat <- try(compute_weights(rv$weightMatrix))
if (!inherits(resmat, 'try-error')) {
rv$weightVect <- resmat}
rv$weightVect <- resmat
#print(cat("Weight vector: ", rv$weightVect))
}
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment