-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Hello,
I am trying to do some atmospheric corrections on Landsat 8 data in Rstudio. Following previous code that I have seen I have run this so far.
install.packages("raster")
install.packages("rgdal")
install.packages("ggplot2")
install.packages("devtools")
install.packages("sf")
Define the multiple mutiple packages in a vector
PkgToLoad <- c("raster", "rgdal", "ggplot2", "devtools", "sf")
Load the packages
lapply(PkgToLoad, library, character.only = TRUE)
library(devtools)
The package 'devtools' is important in order to be able to import packages directly from the Github repository
Had to update all packages before this code would work
install_github("bleutner/RStoolbox")
library("RStoolbox")
#perform the radiometric correction
#Import meta-data and bands based on MTL file
readMeta("C:/Users/Allyson/University of Texas at El Paso/Microsoft forest SD project - General/ABP/PR_Trial/PuertoRicoL8USGS/LC08_L2SP_005047_20180616_20200831_02_T1_MTL.txt") #sep = '=', stringsAsFactors = F package = "RStoolbox")
-when I try to read the MTL file I get this error
Error in .rowNamesDF<-(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘QA_NA’
I attached the MTL text file. Can anyone give me input on how I can fix this?