I am getting the following error while trying to read the raster file.
Error in .local(.Object, ...) :
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file. (file does not exist)
Here is my code:
install.packages("raster")
install.packages("rgdal")
install.packages("sp")
library(raster)
library(sp)
library(rgdal)
ELEVATION <- raster("/Cloud/project/ll/DEM.tif")
There isn't enough information here for me to be able to help. Try submitting a reproducible example:
Welcome to the RStudio Community!
If not, then I think it may have to do with the path of your tif file. This blog post might help put that into perspective for you:
Project-oriented workflow