if (usesf) {
opts <- character(0)
...
do.call(sf::gdal_utils, args = args)
}
else {
...
a <- system(command = command, intern = TRUE, wait = TRUE)
}
if (!file.exists(destination))
stop("Output file", destination, "was not created. System call returned: ",
a)
In some circumstances, variable
aat line 188 is undefined. This happens when usesf is FALSE and the destination file isn't created.