band1<-raster(B1)
Error in if (x == "" | x == ".") { : argument is of length zero
Asked
Active
Viewed 46 times
0

Phil
- 7,287
- 3
- 36
- 66
-
1what is `B1`? I am guessing a zero length character. – Robert Hijmans Mar 26 '21 at 16:22
-
B1 is the name of the file where Band 1 images are saved. – Spogmay khan Mar 27 '21 at 13:29
-
I doubt that. Please edit your question to show that (print B1 before running this example). – Robert Hijmans Mar 28 '21 at 04:31
1 Answers
0
That suggests that B1 is an empty string
library(raster)
B1 <- character()
B1
# character(0)
raster(B1)
# Error in if (x == "" | x == ".") { : argument is of length zero

Robert Hijmans
- 40,301
- 4
- 55
- 63