.get_yearly | R Documentation |
Retrieve SpatRaster for a selected year
.get_yearly(rst_path, init_month = NULL, start_date, end_date, selected_year)
rst_path |
File path to either:
|
init_month |
Numeric value that represents the initial month that will be used in the calculation of the indices for each year (1 = Jan, 2 = Feb, ...., 12 = December). This parameter is set to NULL meaning that if not specified, the year will start in January. |
start_date |
Position where the dates of the raster files start. For example, start_date = 10 for 'ProductX_1989-02-28.tif' as the date start in the 10th character. |
end_date |
Position where the dates of the raster files end. For example, end_date = 19 for 'ProductX_1989-02-28.tif', and end_date = 16 for 'ProductX_1989-02.nc'. |
selected_year |
The year that will be used to construct the 'SpatRaster' that will be returned by the function. |
'SpatRaster' object for the designed year according to the initial mont that has been selected.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.