Permission denied

Viewed 26

I am having troubles in working with .csv files inside folders. I tried to give permission to R studio and execute as administrator but it did not work. Any suggestion?


"C:/Users/lokit/OneDrive/Escritorio/prices/" %>%
  dir_ls(recurse = TRUE) %>%
  as_tibble_col("path") %>% 
dplyr::mutate(data = purrr::map(path, function(path_i){
  
  data_i <- read_csv(path_i)
  
  if(str_detect(data_i$airline, "€")) {
    
    dplyr::rename(data_i, price = airline)
  }
  
  return(data_i) }))

Warnung: cannot open file 'C:/Users/lokit/OneDrive/Escritorio/prices/2022-01-20': Permission deniedError in `dplyr::mutate()`:
! Problem while computing `data = purrr::map(...)`.
Caused by error in `file()`:
! cannot open the connection
Backtrace:
  1. ... %>% ...
 12. vroom `<fn>`("C:/Users/lokit/OneDrive/Escritorio/prices/2022-01-20")
 13. vroom:::detect_compression(path)
 14. base::readBin(path, "raw", n = 6)
 15. base::file(con, "rb")
0 Answers
Related