问题描述
library(shiny)
library(shinydashboard)
library(googlesheets4)
library(googledrive)
library(DT)
drive_auth(email = "xxxx")
shinyws1<-gs4_create("WS1")
#table<-read_sheet("xxx")
# Define UI for application
ui <- fluidPage(
# Application title
titlePanel("Test App"),# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
numericInput("bins","Number of friends:",min = 1,max = 100,value = 50),actionButton("submit","Submit",class="btn-success")
),# Show a plot of the generated distribution
mainPanel(
#blank so far
)
)
)
# Define server logic required to draw a histogram
server <- function(input,output) {
#results<-reactive(input$bins)
observeEvent(input$submit,{
shinyws1 %>% sheet_append(as.data.frame(input$bins))
})
}
# Run the application
shinyApp(ui = ui,server = server)
在我的本地服务器上还可以。但是部署失败。
Error in value[[3L]](cond) : Can't get Google credentials.
Are you running googledrive in a non-interactive session? Consider:
* `drive_deauth()` to prevent the attempt to get credentials.
* Call `drive_auth()` directly with all necessary specifics.
* Read more in: https://gargle.r-lib.org/articles/non-interactive-auth.html
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
有人知道如何解决吗?我已经尝试了所有在网上找到的解决方法,但是没有成功。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)