Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 为什么我在尝试发布到shinyapps时会看到这个错误?_R_Shiny_Publish - Fatal编程技术网

R 为什么我在尝试发布到shinyapps时会看到这个错误?

R 为什么我在尝试发布到shinyapps时会看到这个错误?,r,shiny,publish,R,Shiny,Publish,我正在尝试将包含以下数据的条形图发布到闪亮的应用程序上: state mean_gain 1 Alabama 6.500000 2 Alaska 6.937931 3 Arizona 6.693750 4 Arkansas 7.306579 5 California 5.823729 6 Co

我正在尝试将包含以下数据的条形图发布到闪亮的应用程序上:

                  state mean_gain
1               Alabama  6.500000
2                Alaska  6.937931
3               Arizona  6.693750
4              Arkansas  7.306579
5            California  5.823729
6              Colorado  5.412308
7           Connecticut  6.422222
8              Delaware  8.725000
9  District of Columbia  3.700000
10              Florida  7.216176
11              Georgia  6.888750
12               Hawaii  6.166667
13                Idaho  7.000000
14             Illinois  7.932039
15              Indiana  7.683871
16                 Iowa  7.487000
17               Kansas  8.300000
18             Kentucky  7.926446
19            Louisiana  8.629231
20                Maine  7.288235
21             Maryland  7.876000
22        Massachusetts  6.553333
23             Michigan  7.922619
24            Minnesota  6.918182
25          Mississippi  6.993976
26             Missouri  7.239655
27              Montana  6.114035
28             Nebraska  6.906383
29               Nevada  7.694444
30        New Hampshire  7.700000
31           New Jersey  7.304545
32           New Mexico  7.179412
33             New York  7.547619
34       North Carolina  6.391089
35         North Dakota  5.940741
36                 Ohio  8.887640
37             Oklahoma  7.824359
38               Oregon  7.367568
39         Pennsylvania  7.082353
40         Rhode Island  7.683333
41       South Carolina  5.791489
42         South Dakota  5.277612
43            Tennessee  6.566667
44                Texas  7.543529
45                 Utah  7.353333
46              Vermont  6.920000
47             Virginia  6.595556
48           Washington  7.332500
49        West Virginia  6.937500
50            Wisconsin  7.234247
51              Wyoming  7.254167
我用来发布到shinyapps的代码是:

用户界面:


ui确保您使用的所有软件包都已加载

库(闪亮)
图书馆(tidyverse)
ui
unique(mobese1_-df[mobese1_-df$state%in%input$select3,])
ui <- fluidPage(
checkboxGroupInput("select3",
                                             "Select States:",
                                            choices = unique(mobese1_df$state)),

                                uiOutput("bcheckbox"),

                                plotOutput("barPlot")
)
output$bcheckbox <- renderUI({
        choice <-  unique(mobese1_df[mobese1_df$state %in% input$select3])
        checkboxGroupInput("mcheckbox", " ", choices = choice)

    })

    output$barPlot<- renderPlot({
        bplot_data <-  mobese1_df %>% filter(state %in% input$select3)

        ggplot(bplot_data, aes(x = state, y = mean_gain)) + geom_bar(stat="identity") + 
            ggtitle("Male Mean Obesity Increase by State 2001 - 2009") +
            xlab("State") + ylab("Percent Increase")