PGOptionsManager: R6 Class to set and get package-wide options for PRIO-GRID.

PGOptionsManagerR Documentation

R6 Class to set and get package-wide options for PRIO-GRID.

Description

Options are stored in a persistent file in AppData, see pgconfig_cache$info()

Methods

Public methods


Method new()

Initialize options

Usage
PGOptionsManager$new()

Method set_extent()

Set output spatial extent

Usage
PGOptionsManager$set_extent(value)
Arguments
value

A vector with extent, c(xmin, xmax, ymin, ymax)


Method set_crs()

Set output CRS

Usage
PGOptionsManager$set_crs(value)
Arguments
value

CRS string


Method set_nrow()

Set number of rows in output raster

Usage
PGOptionsManager$set_nrow(value)
Arguments
value

Integer


Method set_ncol()

Set number of cols in output raster

Usage
PGOptionsManager$set_ncol(value)
Arguments
value

Integer


Method set_rawfolder()

Set the folder where raw-data should be downloaded (possibly very large files), defaults to temporary folder

Usage
PGOptionsManager$set_rawfolder(value)
Arguments
value

String path to folder


Method set_verbose()

Set verbose output of functions if true.

Usage
PGOptionsManager$set_verbose(value)
Arguments
value

Boolean


Method get_crs()

Get crs option

Usage
PGOptionsManager$get_crs()

Method get_extent()

Get extent option

Usage
PGOptionsManager$get_extent()

Method get_nrow()

Get nrow option

Usage
PGOptionsManager$get_nrow()

Method get_ncol()

Get ncol option

Usage
PGOptionsManager$get_ncol()

Method get_rawfolder()

Get rawfolder option

Usage
PGOptionsManager$get_rawfolder()

Method get_verbose()

Get verbose option

Usage
PGOptionsManager$get_verbose()

Method print()

Prints all options

Usage
PGOptionsManager$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
PGOptionsManager$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

pgoptions <- PGOptionsManager$new()
pgoptions$set_rawfolder <- tempfolder()
pgoptions$set_verbose(FALSE)
pgoptions$print()

prio-data/priogrid documentation built on Oct. 11, 2024, 8:34 p.m.