Using table1 package in a loop for several columns

Hey everyone

I am trying to draw some tables and plot in a dropdown menu in Rmarkdown but the run-time is shiny.
when I select the cols from selectInput, which I have 20 columns to loop over, I cannot change the output table col names
this is my code:
table1(~ get(input$resp) | factor(Age),data = d)

and the output is:
image

how can I change th "get(input$resp))" to the actual name of the response in every iteration of the loop?

Can anyone help me?