rastertmpdir_movetonew: Functions for using and then deleting new temporary...

View source: R/tmprasterdir.R

rastertmpdir_movetonewR Documentation

Functions for using and then deleting new temporary directories

Description

The raster package does large computations by saving data temporarily to the computer harddisk. However, the package does not know when to delete these files so they are left there. For large data computations the hard drive can quickly fill with intermediate data files. Any data that you want to save in the temporary directory must moved elsewhere before deleting the temporary directory.

Usage

rastertmpdir_movetonew(newdir = NULL)

rastertmpdir_movetoorig(origdir)

rastertmpdir_removenew(newdir)

Arguments

newdir

New directory name within the current raster temporary direcotory. If NULL it will be generated on creation.

origdir

Original temporary raster directory

Functions

  • rastertmpdir_movetoorig: Switches raster temporary directory back to original directory.

  • rastertmpdir_removenew: Deletes the temporary directory.

Examples

dirs <- rastertmpdir_movetonew()
rastertmpdir_movetoorig(dirs$orig)
# shift data to save
rastertmpdir_removenew(dirs$new)

sustainablefarms/sflddata documentation built on April 19, 2022, 11:19 a.m.