0

Any idea what is happening? I know it's probably running out of memory but the two tif files are only about 1GB each and I am clearing the memory of things I no longer need. This shouldn't be happening with 32GB RAM, a 40GB page file and plenty of free space on both the C and D drive. When I run the same code on smaller tiffs I have no issues at all. I'm still new to R, can anyone shed some light on what I'm doing wrong? It crashes while trying to do the merge (which runs for like 20min before giving up). Thanks.

satMax15 <- stack("D:/LiDAR/Landsat Data/For_Joe/New/Max_2015.tif") 
satMed15 <- stack("D:/LiDAR/Landsat Data/For_Joe/New/Med_2015.tif")

satMax15.df <- as.data.frame(satMax15, xy=TRUE)
satMed15.df <- as.data.frame(satMax15, xy=TRUE)
rm(satMax15,satMed15)

rawData.land <- merge(satMax15.df,satMed15.df)
rm(satMax15.df,satMed15.df)
rawData.land <- rawData.land[complete.cases(rawData.land),]

save(rawData.land,file="D:/rawData_land.Rda")
pyrojoe34
  • 26
  • 1
  • try faster (and more memory efficient) `merge` methods, you can see comparison in [this SO](http://stackoverflow.com/a/34219998/2490497) – jangorecki Aug 26 '16 at 15:04
  • Okay thanks I will look into those and see if it helps. In this case I was able to just use cbind with these two files since the rows are perfectly aligned but downstream I will have to have it match up the XY columns for me since they won't all align perfectly. – pyrojoe34 Aug 26 '16 at 18:22

0 Answers0