To extract specific information of a ENVI .hdr-file I want to read it into R, using caTools::read.ENVI(). Unfortunately R just throws ERROR messages and I do not have a clue how to solve this problem.
What I have tried so far is following:
# install.packages("rgdal")
# install.packages("raster")
# install.packages("caTools")
library("rgdal")
library("raster")
library("caTools")
hdr_dir <- "D:/ExploreR/X_Test/01_data/dataset.hdr"
hdr_file <- read.ENVI(hdr_dir, headerfile = paste(hdr_dir, ".hdr", sep = ""))
# Error in read.ENVI(hdr_dir, headerfile = paste(hdr_dir, ".hdr", sep = "")) : read.ENVI: Could not open input header file: D:/ExploreR/X_Test/01_data/dataset.hdr.hdr
Does anybody know how to solve this problem? Thanks a lot for your help in advance!