Skip to content

Commit

Permalink
Merge pull request #26 from mabecker89/main
Browse files Browse the repository at this point in the history
fix to accommodate slashes in org names
  • Loading branch information
mabecker89 authored Oct 11, 2023
2 parents e3cba7d + 4ff82a0 commit 53191fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ wt_download_report <- function(project_id, sensor_id, reports, weather_cols = TR
unzip(tmp, exdir = td)

# Remove abstract file
abstract <- list.files(td, pattern = "*_abstract.csv", full.names = TRUE)
abstract <- list.files(td, pattern = "*_abstract.csv", full.names = TRUE, recursive = TRUE)
file.remove(abstract)

# List data files, read into R as a list
files <- gsub(".csv", "", list.files(td, pattern = ".csv"))
files.full <- list.files(td, pattern = ".csv", full.names = TRUE)
files <- gsub(".csv", "", list.files(td, pattern = ".csv", recursive = TRUE))
files.full <- list.files(td, pattern = ".csv", full.names = TRUE, recursive = TRUE)
x <- purrr::map(.x = files.full, .f = ~ read.csv(., fileEncoding = "UTF-8-BOM")) %>%
purrr::set_names(files)

Expand Down

0 comments on commit 53191fd

Please sign in to comment.