Skip to content

Commit

Permalink
Remove file extensions and check duplicated file names
Browse files Browse the repository at this point in the history
  • Loading branch information
mingstat committed Nov 19, 2024
1 parent e91f221 commit 96fa7de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ load_data_files <- function(file_paths) {
return(data)
})

names(data_list) <- basename(file_paths)
names(data_list) <- tools::file_path_sans_ext(basename(file_paths))

if (any(duplicated(names(data_list)))) {
stop("load_data_files(): Duplicate file names detected. Please ensure all file names are unique.")
}

return(data_list)
}

0 comments on commit 96fa7de

Please sign in to comment.