从Rstudio(windows)发布我的闪亮代码时,我进入帐户名称字段'[object Object]'而不是我的帐户名称,导致以下错误消息:
Error: account named '[object Object]' does not exist
我尝试了几件事,但似乎没有任何效果。请注意,我有最新版本的shinyapps,并尝试过诸如生成新令牌等等。
谢谢,
以下是我正在使用的代码:
library(shiny)
library(shinyapps)
ui<- fluidPage(
titlePanel("Bidding Centre"),
#Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "bins",
label = "Number of bins:",
min = 1,
max = 50,
value = 30),
textInput(inputId = 'title',
label = 'Write a title',
value = 'Try me!')),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
)
library(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white',main=input$title) })
})
答案 0 :(得分:3)
我遇到了同样的问题。我会点击运行应用,然后点击发布&#39;,但收到相同的错误消息:
Error: account named '[object Object]' does not exist
我可以通过手动运行命令来修复它:
shinyapps::deployApp('~/path/to/app')
希望这有帮助!