This is the first time I use this forum. As a novice with Shiny I am stuck with creating a Table1 in Shiny. When I execute the code with one of my variables in RenderTable instead of 'input$cat_var' , the code runs fine (showing Table1 in a dashboard). However this is not reactive. Therefore I wanted to use 'input$cat_var'. It is probably a very easy question to answer, but I have been going over it for hours and cannot figure it out.
Since we don't have your dataset, or at least a sample of it, it's hard to recreate the issue.
Here is a working example with one of the default datasets (CO2) from R
Thank you very much for your quick answer PJ! My apologies, in the future I will generate a reprex to make myself more clear. Thank you for helping me
However, continuing with your example, the problem for me is that table1 doesn't stratify for 'input$cat_var'. In your example I would expect a stratified table1 for Quebec and Mississippi when choosing the variable 'Type' and nonchilled and chilled for using the variable 'Treatment'. I have updated all my packages and restarted R as well. Do you know why I can't see and/or why there is no stratification performed by the table1 function?
I see now what you mean
The documentation is very confusing and not clear on how to properly do this, but here is a quick fix by making a formula pasting stuff together.
For some reason all the CSS of this table gets lost when seen in the app, resulting in a bad looking layout of the table. I spent a while trying to understand the documentation but it's bad