Skip to content

Commit

Permalink
add support for hdr dat in read any
Browse files Browse the repository at this point in the history
  • Loading branch information
wincowgerDEV committed May 28, 2024
1 parent e1d88dd commit 5d7d51b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/read_multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
#'
#' @export
read_any <- function(file, ...) {
if(length(file) > 1){
if(length(file) == 2 & any(grepl("(\\.dat$)", ignore.case = T, file)) & any(grepl("(\\.hdr$)", ignore.case = T, file))){
os <- read_envi(file = file[grepl("(\\.dat$)", ignore.case = T, file)], header = file[grepl("(\\.hdr$)", ignore.case = T, file)], ...)
}
else if(length(file) > 1){
os <- read_many(file = file, ...)
}
else if (grepl("(\\.zip$)", ignore.case = T, file)) {
Expand Down

0 comments on commit 5d7d51b

Please sign in to comment.