Skip to contents

Load rasters stored in the cronus database.

Usage

load_map(x, ...)

# S4 method for Product
load_map(x, variable, date = NULL)

# S4 method for Cropmaps
load_map(x, variable, date = NULL)

Arguments

x

S4 object. A product of interest.

...

extra arguments.

variable

character. The variable of interest.

date

character. Dates of interest.

Value

SpatRaster.

Examples

if (FALSE) {
# Define required variables
region <- Region(name = "nebraska", type = "us state",
                 div = c(country = "United States", state = "Nebraska"))
date <- date_seq("2002-01-01", "2002-12-31")

## Daymet

# Create the object
x <- new("Daymet", region = region, date = date)

# Load the map
variable <- "gdd"
load_map(x, variable)
load_map(x, variable, as.Date("2002-08-01"))
}