我正在尝试制作一个基本的 RShiny 应用程序,用户可以在其中上传同时固定的静态 csv 文件。根据下面的错误消息,似乎pin()
不接受反应数据集?话虽这么说,我想知道是否有人知道如何解决这个问题。
Warning: Error in board_pin_create.rsconnect: Failed to create pin:
Application name must be between 3 and 64 alphanumeric
characters, dashes, and underscores.
library(pins)
pins::board_register_rsconnect()
ui <- fluidPage(
tabsetPanel(
tabPanel("Tab 1",
## Import csv
fileInput("file1", "Choose Your csv File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"))
)
)
)
server <- function(input, output, session) {
### Import csv
df <- reactive({
req(input$file1)
rbindlist(lapply(input$file1$datapath, fread), use.names = TRUE, fill = TRUE)
})
## Pin
df1_pin <- reactive({
pin(df(), board = "rsconnect")
})
}