添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
腼腆的柠檬  ·  HUAWEI MatePad Air ...·  4 月前    · 
坚韧的小刀  ·  rows.add() ...·  4 月前    · 

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