greetings everyone
I try to retrieve the current directory and then treat it as a variable that I can write to a file.
In the example I show below, the goal is slightly different but it reflects my shortcomings for this kind of task. Here, using the current directory to write a file.
library(shiny)
ui <- fluidPage(
mainPanel(
verbatimTextOutput("currentPathway", placeholder = TRUE)
))
server <- function(input, output) {
global <- reactiveValues(datapath = getwd())
output$currentPathway <- renderText({global$datapath})
tableFileName = paste(output$currentPathway, '/table.txt', sep='')
write.table( matrix(1:10, ncol=2), tableFileName )
}
# Run the application
shinyApp(ui = ui, server = server)
Here, R refuses to paste output$currentPathway with '/table.txt'.
Would anyone by any chance know how to do that?
Thank you all very much,
C.