Learn R Programming

dggridR (version 3.1.0)

dgsetres: Set the resolution of a dggs object

Description

Set the resolution of a dggs object

Usage

dgsetres(dggs, res)

Value

Returns a dggs object which can be passed to other dggridR functions

Arguments

dggs

A dggs object from dgconstruct().

res

Resolution. Must be in the range [0,30]. Larger values represent finer resolutions. Appropriate resolutions can be found with dg_closest_res_to_area(), dg_closest_res_to_spacing(), and dg_closest_res_to_cls(). Default is 9, which corresponds to a cell area of ~2600 sq km and a cell spacing of ~50 km. Default: 9.

Examples

Run this code
library(dggridR)
dggs <- dgconstruct(res=20)
dggs <- dgsetres(dggs,10)

Run the code above in your browser using DataLab