이 누구를 우려를 수도 RGDAL 및 래스터 패키지를 사용하는 동안 발생 :R : 오류
GRA_D1<- raster(files[[1]])
//Sets up an empty output raster:
GRA_D1<- writeStart(GRA_D1,filename='GRA_D1.tif', format='GTiff', overwrite=TRUE)
//Write to the raster, for loop:
for(i in 1:dim(GRA_D1)[1]){
//Extract raster values at rows
d.Frame<- matrix(NA,ncol=2,nrow=dim(GRA_D1)[2])
d.Frame[,1]<- getValues(r1[[1]],i)
d.Frame[,2]<- getValues(r1[[2]],i)
w.Frame<- as.data.frame(d.Frame)
names(w.Frame)<- c("D1_pred_disAg","D1_pred_RK")
//Apply the predictive model:
m.pred<-predict(mod.1, w.Frame)
//Write the predictions to the empty TIFF raster
GRA_D1<-writeValues(GRA_D1,m.pred,i)
print(i)}
//Finish writing to the raster
GRA_D1<- writeStop(GRA_D1)
나는 빈 TIFF 래스터 출력을 쓰기를 시도하고있다 : 여기
는 소스 코드
#Error in .local(.Object, ...) :
`general_file_path\GRA_D1.tif' does not exist in the file system,
and is not recognised as a supported dataset name.
:하지만 나는 다음과 같은 오류 메시지가 계속
이것이 RGDAL 또는 RASTER 패키지의 함수를 잘못 사용하는 것과 관련이 있는지 궁금합니다.
나를 도와 줄 수 있습니까?
미리 감사드립니다.
건배, AD
당신은 혼자가 아닙니다 (그 파일 이름이 잘 작동). 나는 또한 오류의 원인이 무엇인지 알아 내는데 많은 시간을 보냈다. 밑줄을 제거하면 더 자세한 오류 메시지가 나타납니다. 그래서 밑줄 ('_')과 'EOF의 구문 분석 오류가 아니라 모든 요소가 닫혀 있기 때문에 VRTDataset으로 시작하는 ' – EpiGen