Skip to contents

fasterRaster attempts to remove intermediate rasters and vectors from the GRASS cache as they are not needed, but files can still accumulate, especially if you remove GRasters or GVectors from the R working environment (e.g., by using rm() or simply using the same variable name for different rasters/vectors). This function will a) search the GRASS cache for all rasters/vectors there; and b) remove any of them that are not pointed to by an object in the active R environment.

Note that calling this function inside another function's environment can be very dangerous, as it will only be able to see objects in that environment, and thus delete any rasters/vectors outside that environment.

Note also that this function will only clean the current GRASS project/location.

Usage

mow(x, type = NULL, verbose = TRUE, ask = TRUE)

Arguments

x

Either missing (default) or an environment.

type

Either NULL or a character vector. If NULL, all rasters and vectors in the GRASS cache are candidates for deletion. Otherwise, this can be either "raster", "vector", or both.

verbose

Logical: If TRUE (default), report progress.

ask

Logical: If TRUE (default), prompt for reassurance.

Value

Invisibly returns a list with the number of rasters and vectors deleted.

See also

Option clean in faster()

Examples

if (grassStarted()) {

if (FALSE) mow()

}