首页 > 解决方案 > 为什么我使用 fileInput 的数据路径更改为 /var 数据路径本身?以及如何取回原始数据路径

问题描述

当我使用上面的代码上传一个 csv 文件时,我用文本输出数据路径,但它看起来很实用,有人告诉我这看起来像一个 url 模式数据路径,我只想知道我怎样才能回到正常的数据路径比如/users/ziqinhe/...,因为我记得以前是正常路径但是不知道为什么会变成这样 在此处输入图像描述

这是我的代码:

library(reticulate)
ui <- fluidPage(
  fileInput("aa","input csv file ", accept = c(".csv")),
  textOutput("p"),
)
server <- function(input,output){
  output$p <- renderText({
    input$aa$datapath
  })
}
shinyApp(ui, server)

谢谢你的帮助

标签: rshiny

解决方案


推荐阅读