EVOLUTION-MANAGER
Edit File: datasource.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Are values in memory and/or on disk?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for datasource {raster}"><tr><td>datasource {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Are values in memory and/or on disk?</h2> <h3>Description</h3> <p>These are helper functons for programmers and for debugging that provide information about whether a Raster object has associated values, and if these are in memory or on disk. </p> <p><code>fromDisk</code> is <code>TRUE</code> if the data source is a file on disk; and <code>FALSE</code> if the object only exists in memory. </p> <p><code>inMemory</code> is <code>TRUE</code> if all values are currently in memory (RAM); and <code>FALSE</code> if not (in which case they either are on disk, or there are no values). </p> <p><code>hasValues</code> is <code>TRUE</code> if the object has cell values. </p> <h3>Usage</h3> <pre> fromDisk(x) inMemory(x) ## S4 method for signature 'BasicRaster' hasValues(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> Raster* object </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p> additional arguments. None implemented </p> </td></tr> </table> <h3>Value</h3> <p>Logical </p> <h3>Examples</h3> <pre> rs <- raster(system.file("external/test.grd", package="raster")) inMemory(rs) fromDisk(rs) rs <- readAll(rs) inMemory(rs) fromDisk(rs) rs <- rs + 1 inMemory(rs) fromDisk(rs) rs <- raster(rs) inMemory(rs) fromDisk(rs) rs <- setValues(rs, 1:ncell(rs)) inMemory(rs) fromDisk(rs) #rs <- writeRaster(rs, filename=rasterTmpFile(), overwrite=TRUE) #inMemory(rs) #fromDisk(rs) </pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>