View source: R/transfer_raster_RData.R
transfer_raster_RData | R Documentation |
Get the values of a Raster*, storage them into an array
and
finally save the array in an RData
which allows for compatibility with multiple
R functions as well as great portability.
transfer_raster_RData( inputFile, outputPath, transferOneFile = TRUE, vmode = c("integer", "single", "double") )
inputFile |
character with full path name of input file. |
outputPath |
character with full path name (where the |
transferOneFile |
logical, default |
vmode |
a character specifying the type of virtual storage mode |
Prior to embark the user in a transfer that may not be successful due to the
lack of RAM, this function provides an estimate of the amount of bytes to be used
in the transfer process. The estimate is obtained by multiplying the number of rows by the number of
columns by the number of layers of the Raster*
object to transfer by the amount of
bites used by vmode
(32-bit float for integer
or single
and
64-bit float for double
). A question is displayed in the console requesting whether
the process should continue. Should the user decide not to continue with the
importation transfer_raster_RData
returns the message "Did not transfer anything"
.
When transferOneFile=FALSE
, it is assumed that the system has enough RAM to support full files
transfer -no question is asked in the console. This option is useful when this function is used within
a for
loop.
At the designated path (outputPath
) the user will find an RData
file.
vmode
inputFile = system.file("extdata", "master.tif", package = "geoTS") outputPath = paste0(system.file("extdata", package = "geoTS"), "/master") transfer_raster_RData(inputFile = inputFile, outputPath = outputPath, vmode = "single")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.