app_test.R
library(shiny)
ui <- fluidPage(
includeHTML("www/index.html")
)
server <- function(input, output, session) {
data <- reactive({
f1<-paste(read.csv(input$file))
return(f1)
})
output$text <- renderTable({
x=data()
})
}
shinyApp(ui, server)
index.html
<!DOCTYPE HTML>
<html>
<head>
<title>Samp R with html</title>
</head>
<body>
<form>
choose file:<input type="file" name="file" id="file" />
</form>
<p id="text" class="shiny-html-output" ></p>
</body>
</html>
These two are my R and html files. I want to display csv file as table which is uploaded by user. Iam getting the ERROR:'file' must be a character string or connection