R: Error output while using GRASS

204 Views Asked by At

I had seen this this but even after I remove the space or a separator in between the file name and appended number, I keep in getting the same error. Are there any suggestions for this:

execGRASS("r.in.gdal",flags=c("o","overwrite"),
parameters=list(input=paste(path, paste("T", as.character(i),
sep=""), sep="/"), output=paste("T", as.character(i), sep="")))

ERROR 4: `F:/Desktop/Folder/T1' does not exist in the file system,
and is not recognised as a supported dataset name.

I also checked if that particular file T1 doesn't exist in the path. But surprisingly it does exist.

OS: Windows 10, Grass Version: 7.0

Thanks.

1

There are 1 best solutions below

0
On

Your list.files("F:/Srinu/RLP_Thesis") does not show a file called F:/Desktop/Folder/T1. In fact there are unrelated paths.

Either way, it should probably be something like F:/Desktop/Folder/T1.tif

If you are confused about how to create filenames through code, first test your function with actual filenames. You probably are looking for something like:

input = paste0(path, "/T", i, ".tif")