I am trying to run mosaic on a band and at this stage while i am applying raster it is giving me this error

52 Views Asked by At
band1<-raster(B1)
Error in if (x == "" | x == ".") { : argument is of length zero
1

There are 1 best solutions below

0
Robert Hijmans On

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