R Shiny tabset first tabpanel not displaying output

The user can upload a CSV file. In the actual R Shiny application, a regression is run and the table of results should be displayed in two tabs. The application does not display any results or generate any error messages. In the MWE (code in thread reply below), just the table from the uploaded CSV should be displayed, but the tabs display nothing. No errors either.
Without the tabset and tabpanel (with no tabs, just the mainPanel), the application worked.
Example CSV https://docs.google.com/spreadsheets/d/14rU8q4YUpjsmfS1D6n0TdVGvX0-RzCzVyfZGOOnwo_c/edit?usp=sharing

You're going to kick yourself.... results1 in your UI matches no output$ in your server. rather you called it

output$results <- DT::renderDataTable({

so you should rename , to align the names for this element.

Thank you, nirgrahamuk! The original application did not have the misnaming problem though - just results and results2 in both the mainPanel and the server. The MWE is now fixed (I edited the question too), displays the results in both tabs. Previously in only one. The actual application does not display the results in either tab.

so your original MWE now updates, illustrates no error, so would you agree it serves no purpose ?
perhaps you could remove it as it probably will confuse or at least delay other forum users from helping you.
However, you may wish to simply try again, making a MWE that is much reduced from your total application... this again will likely improve the chances of your getting a helpful response.

The first thing I noticed is that you repeat ID's which should be unique.
i.e. kontroll is placed twice.
This is not allowed in Shiny.

This fixed the problem, thank you! I did not know the same function/part under server() cannot be called twice.
I agree the original MWE serves no purpose. I removed it.

in rare circumstances, it might be appropriate to chain inputs i.e.
in UI


and in server

output$myuniq1 <- output$myuniq2 <- renderUI({ some render code })

but use with caution.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.