[問題] R shiny app tabs not showing

作者: luenchang (luen)   2024-04-04 12:36:20
[問題敘述]:
想要把一個在shinyapps.io上面的app
https://luenhchang.shinyapps.io/barcode-scan/
的頁面改成有tab, 例如以下網頁裡的圖所呈現
https://stackoverflow.com/questions/40438390/how-to-put-outputs-side-by-side-in-shiny
我把ui 的部分改成和上述網頁類似,在local PC及shinyapps.io上發佈後都沒有出現
tabs, 只出現了兩個bullet points. 我會在推文裡放張圖。不知道有人的app在
shinyapps.io上面是能呈現tab的嗎?
[程式範例]:
ui部分的程式如下:
ui <- shiny::mainPanel(
shiny::tabsetPanel(type = "tabs"
# First tab
,shiny::tabPanel(title = "Food" # Tab name
,tableOutput(outputId="table.food.expiring") # All output under this tab
,tableOutput(outputId="table.food.consumed")
,tableOutput(outputId="table.food.price")
) # Close tabPanel()
# Second tab
,shiny::tabPanel(title = "Hygiene Product" # Tab name
,tableOutput(outputId="table.hygiene.count.unopened")
)# Close tabPanel()
) # Close tabsetPanel()
) # Close mainPanel()
所有的code可以在以下連結裡看到。這個檔案和我前一篇發文的檔案是一樣的。
[barcode-scanner_shiny-web-app.R](https://drive.google.com/file/d/1LypwN5rQftb5kPH8FzDN6aviGpxzNEZE/view?usp=sharing)
作者: luenchang (luen)   2024-04-04 12:41:00
我用tabsetPanel()及tabPanel()想產生兩個tabs Food及Hygiene products. 只出現了兩個bullet pointshttps://i.imgur.com/VYfDGf8.jpg

Links booklink

Contact Us: admin [ a t ] ucptt.com