assignment of an object of class “numeric” is not valid for @‘Dim’ in an object of class “dgTMatrix”; is(value, "integer") is not TRUE

Hi,

Issues with Shiny code can stem from both the reactive Shiny code itself or the regular R code used in the functions. In order for us to help you with your question, please provide us a minimal reproducible example (Reprex) where you provide a minimal (dummy) dataset and code that can recreate the issue. One we have that, we can go from there.

I suggest you first try to figure out if the issue is with the R or Shiny. Try and run the R code with some sample data line by line and see if it produces the error (replacing any Shiny variables by regular ones). If not, it might be Shiny related.

For help on creating a Reprex, see this guide:

Good luck!
PJ