Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17208

[R] Removing files after reading them in R

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 7.0.1
    • None
    • R
    • None

    Description

      In R it's not possible to delete the files eventhough the dataframe is cleared from the R environment. 

      write.csv(mtcars, file = "mtcars.csv", quote = FALSE, row.names = FALSE)
      df <- arrow::to_duckdb(arrow::open_dataset("mtcars.csv", format = "csv", delimiter = ","))
      
      df <- df %>% select(c("mpg", "disp", "drat", "wt")) %>% collect()
      
      ## Do some checks on df.
      
      rm(df)
      file.remove("mtcars.csv")
      

      The `file.remove` leads to a Permission Denied error eventhough the dataframe is cleared from the R environment. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            wytzepakito Wytze Gelderloos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: