Hello I don't understand why in my shiny app I cannot successfully output the matrix I have.
I ran the code in r out of the app to attest if the matrix is there :

here the error message,

I understand that the subscript is wrong somewhere but I don't know where
and here the code which is supposed to output the matrix :
In the UI :
tabPanel("Composition du portefeuille", dataTableOutput("poids"))
in the server :
weight<-reactive({MAIN(input$Actifs,input$chxOpt,input$geom)})
output$poids<-DT::renderDataTable({weight()})
Main is the function that output the matrix perfectly fine in R alone
Please it's driving me crazy