Error in read.table: object 'params' not found
[No stack trace available]
server.R
shinyServer(function(input, output) {
output$report <- downloadHandler(
filename = "report.html",
content = function(file) {
# Copy the report file to a temporary directory before processing it, in
# case we don't have write permissions to the current working dir (which
# can happen when deployed).
tempReport <- file.path(tempdir(), "report.Rmd")
file.copy("report.Rmd", tempReport, overwrite = TRUE)
# Set up parameters to pass to Rmd document
infile4 <- input$cleanedFile
params <- list(n = infile4$datapath)
rmarkdown::render(tempReport, output_file = file,
params = params,
envir = new.env(parent = globalenv())
)
}
)
})
.Rmd
---
title: |
| \vspace{5cm}
output:
html_document:
toc: yes
toc_depth: 2
toc_float: True
number_sections: true
params:
n: NA
---
```{r global, include=FALSE}
screeningData = read.csv(file = params$n, sep = ",")
```