部署我的第一个闪亮的应用程序 - 简单的html解析器,让用户上传一个html文件,然后解析它以获取LinkedIn上的分享/提及/喜欢的信息.
该应用程序在本地运行良好(在部署之前进行测试),Rstudio在部署时不会显示任何错误.但是,当我使用shinyapps链接运行它时,似乎上传无法完成,我没有得到任何输出.
它在当地的样子
打开应用程序
正在上传.html文件
在shinyapps.io看起来像什么
我已经编辑了文件名,因为它包含识别信息.
代码如下:
library(rvest)
library(shiny)
ui <- fluidPage(
# theme = "https://bootswatch.com/4/superhero/bootstrap.css",
title = "LinkedIn Report",
fluidRow(
column(12,
fileInput("infile", "Choose .html file",
accept = "text/html", multiple = F) )
),
fluidRow(
column(12,
tableOutput("savedLocation") )
),
fluidRow(
column(12,
tableOutput("parsedData") ),
column(8,
downloadButton("downloadData", "Download"))
)
)
server <- function(input, output){
dd <- reactive(input$infile)
output$savedLocation <- renderTable({
if(is.null(input$infile)){
return(data.frame(Elapsed = character(),
Time = character(),
Name = character(),
Action = character()))
}else{
return(dd())
}
})
actual_data <- …Run Code Online (Sandbox Code Playgroud)