"Failure during raster IO" when converting raster to data.frame?
<p>Anyone have any idea what may be happening? Here is my console printout. What's weird is that the first four <code>as.data.frame</code> lines run without issue but the last one gives me the "Failure during raster IO" error.</p>

<pre><code>library("raster", lib.loc="~/R/win-library/3.3")
library("rgdal", lib.loc="~/R/win-library/3.3")
#&gt; rgdal: version: 1.1-10, (SVN revision 622)
#&gt; Geospatial Data Abstraction Library extensions to R successfully loaded
#&gt; Loaded GDAL runtime: GDAL 2.0.1, released 2015/09/15
#&gt; Path to GDAL shared files: C:/Users/JV-Desktop/Documents/R/win-library/3.3/rgdal/gdal
#&gt; Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
#&gt; Path to PROJ.4 shared files: C:/Users/JV-Desktop/Documents/R/win-library/3.3/rgdal/proj

liMax &lt;- as.data.frame(raster("D:/LiDAR/LiDAR/30_m/m_30_max.tif"), xy=TRUE)
CanopyBase &lt;- as.data.frame(raster("D:/LiDAR/LiDAR/30_m/m_30_avg.tif") - raster("D:/LiDAR/LiDAR/30_m/m_30_std.tif"), xy=TRUE)

rawData.li &lt;- merge(liMax,CanopyBase)
processed.li &lt;- rawData.li[complete.cases(rawData.li),]

satMax &lt;- as.data.frame(stack("D:/LiDAR/Landsat/For_Joe/Max_2015.tif"), xy=TRUE)
satMed &lt;- as.data.frame(stack("D:/LiDAR/Landsat/For_Joe/Med_2015.tif"), xy=TRUE)
#&gt; Error: Failure during raster IO
</code></pre>

<p>In case it helps here is the printout for the info on the last two files:</p>

<pre><code>stack("D:/LiDAR/Landsat/For_Joe/Max_2015.tif")
# class       : RasterStack 
# dimensions  : 5640, 8763, 49423320, 7  (nrow, ncol, ncell, nlayers)
# resolution  : 30, 30  (x, y)
# extent      : -1491300, -1228410, 2709840, 2879040  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
# names       : Max_2015.1, Max_2015.2, Max_2015.3, Max_2015.4, Max_2015.5, Max_2015.6, Max_2015.7 

stack("D:/LiDAR/Landsat/For_Joe/Med_2015.tif")
# class       : RasterStack 
# dimensions  : 5640, 8763, 49423320, 7  (nrow, ncol, ncell, nlayers)
# resolution  : 30, 30  (x, y)
# extent      : -1491300, -1228410, 2709840, 2879040  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
# names       : Med_2015.1, Med_2015.2, Med_2015.3, Med_2015.4, Med_2015.5, Med_2015.6, Med_2015.7 
# min values  : -0.3208517, -0.5767694, -0.5474564,          ?,          ?,          ?,          ? 
# max values  :          1,          1,          1,          ?,          ?,          ?,          ? 
</code></pre>

<p>I hope this is enough info and I am asking the question correctly. I am new to stackoverflow and relatively new to R and coding in general. Thanks for any insight you can give.</p>