R闪亮应用程序赢得';t上传文件或显示绘图

R闪亮应用程序赢得';t上传文件或显示绘图,r,shiny,R,Shiny,希望有人能帮忙 我正在尝试创建一个R闪亮的应用程序,它可以让我上传一个文件,并在不同的选项卡上显示绘图。当我没有引入标签时,我的文件上传代码可以工作——不确定这会影响什么 我似乎也无法显示我的ggplot,尽管代码在闪亮的应用程序之外工作 以下是我当前的代码(我知道我有一些小部件还没有做任何事情……): ui在ui中有多个同名的plotOutput。与表格输出相同。从ui中取出另外两个选项卡panel语句,看看是否有帮助。如果您需要额外的选项卡面板,请更改名称。Hello@Schuyler Me

希望有人能帮忙

我正在尝试创建一个R闪亮的应用程序,它可以让我上传一个文件,并在不同的选项卡上显示绘图。当我没有引入标签时,我的文件上传代码可以工作——不确定这会影响什么

我似乎也无法显示我的ggplot,尽管代码在闪亮的应用程序之外工作

以下是我当前的代码(我知道我有一些小部件还没有做任何事情……):


ui在
ui
中有多个同名的
plotOutput
。与
表格输出相同
。从
ui
中取出另外两个
选项卡panel
语句,看看是否有帮助。如果您需要额外的
选项卡面板
,请更改名称。Hello@Schuyler Metzger,为了使其可复制,您能否以这种方式提供一个示例数据集:
dataset@Manu
dat您的
ui
中有多个同名的
plotOutput
。与
表格输出相同
。从
ui
中取出另外两个
选项卡panel
语句,看看是否有帮助。如果您需要额外的
tabPanel
,请更改名称。Hello@Schuyler Metzger,为了使其可复制,您能否以以下方式提供示例数据集:
dataset@Manu
dat
ui <- fluidPage(

   # Application title
   titlePanel(h1("Title", align = "center")),

   # Upload file
   fileInput("upload", "Data file:", buttonLabel = "Select File", multiple = FALSE),
   tableOutput("files"), 
   hr(),

   # Tabs for Display Options
   tabsetPanel(
     tabPanel("Table 1", tableOutput("table")),
     tabPanel("Plot1", plotOutput("distPlot")),
     tabPanel("Table 2", tableOutput("table")),
     tabPanel("Plot 2",plotOutput("distPlot")),
     tabPanel("Summary", verbatimTextOutput("summary"))
   ),

   # Sidebar with interactive widgets 
   sidebarLayout(
      sidebarPanel(
      # Radio Buttons for Data Normalization
      radioButtons("radio", label = h3("Pick:"),
                   choices = list("1" = 1, "1" = 2), selected = 1),
         hr(),

      # Checkbox for whether outliers should be included
      checkboxInput("outliers", "Show outliers", FALSE)
      ),
      mainPanel(
         h1("test...")
      )
   )
)

# Server
server <- function(input, output) {

  # You can access the value of the widget with input$file
  output$files <- renderTable(input$upload)

  # Distribution Plots
  output$distPlot <- renderPlot({
    p <- ggplot(data=dat, aes(column1)) + geom_density(aes(y = ..count..), fill = "lightgray")
    print(p)
  })
}

# Run the application 
shinyApp(ui = ui, server = server)