library(raster)
#> 载入需要的程辑包:sp
library(rgdal)
#> rgdal: version: 1.5-23, (SVN revision 1121)
#> Geospatial Data Abstraction Library extensions to R successfully loaded
#> Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
#> Path to GDAL shared files: C:/Users/liuyi/Documents/R/win-library/4.1/rgdal/gdal
#> GDAL binary built with GEOS: TRUE
#> Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
#> Path to PROJ shared files: C:/Users/liuyi/Documents/R/win-library/4.1/rgdal/proj
#> PROJ CDN enabled: FALSE
#> Linking to sp version:1.4-5
#> To mute warnings of possible GDAL/OSR exportToProj4() degradation,
#> use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
#> Overwritten PROJ_LIB was C:/Users/liuyi/Documents/R/win-library/4.1/rgdal/proj
library(remote)
#> 载入需要的程辑包:Rcpp
library(rayshader)
library(oceanmap)
#> Warning: 程辑包'oceanmap'是用R版本4.1.1 来建造的
#> 载入需要的程辑包:maps
#> 载入需要的程辑包:mapdata
#> 载入需要的程辑包:extrafont
#> Registering fonts with R
setwd("D:/nf11")
r1<-raster("D:/nf11/20160207.tif")
r2<-raster("D:/nf11/20161020.tif")
r3<-raster("D:/nf11/20161223.tif")
e<-raster::extent(236400,468600,3553200,3789900)
r1_crop<-raster::crop(r1,e)
r2_crop<-raster::crop(r2,e)
r3_crop<-raster::crop(r3,e)
r_r1_crop<-raster_to_matrix(r1_crop)
r_r2_crop<-raster_to_matrix(r2_crop)
r_r3_crop<-raster_to_matrix(r3_crop)
r11<-raster2matrix(r1_crop)
r111<-as.matrix(r1_crop)
Created on 2021-08-31 by the reprex package (v2.0.1)
The matrix values I converted after trying the above are all NA
Related issues .tif files