I have a similar issue running on Mac :
library(shiny)
ui <- fluidPage(
fileInput("CF", label = "CF"),
fileInput("ED", label = "ED"),
actionButton("Run", "Run")
)
server <- function(input, output, session) {
cf_file <- reactive({
cfFile <- input$CF
return(cfFile$datapath)
})
ed_file <- reactive({
edFile <- input$ED
return(edFile$datapath)
})
table_content <- eventReactive(input$Run, {
req(input$ED$datapath)
req(input$CF$datapath)
file_ed <- ed_file()
file_cf <- cf_file()
system(paste("/bin/qt con ed -i", file_cf, "-p", file_ed, ">", file_ed,".db" ))
})
}
shinyApp(ui, server)
Error:
sh: /bin/qt con ed -i /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0a97a587dbd6a346e41946d1/0.cf -p /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0925189f052a3cdc2163d025/0.ed > /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0925189f052a3cdc2163d025/0.ed.db: No such file or directory
Warning in system2(paste("/bin/qt con ed -i", :
error in running command
When i run the command generated by the system command in normal shell (outside R) it works but fails within R.
/bin/qt con ed -i /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0a97a587dbd6a346e41946d1/0.cf -p /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0925189f052a3cdc2163d025/0.ed > /var/folders/z0/kms9x7hd6hgdtbtk3kxnjcjxw2_l57/T//RtmpjqfSir/0925189f052a3cdc2163d025/0.ed.db
The issue is same with system and system2. Could someone help.