create_calendar: Creates a continious calendar

View source: R/create_calendar.R

create_calendarR Documentation

Creates a continious calendar

Description

Creates a continious calendar according to input parameters : first and final date of the calendar, temporal resolution and temporal resolution unit

Usage

create_calendar(firstdate,finaldate,resolution,unit)

Arguments

firstdate

character string first date of the calendar, format : YYYY-MM-DD

finaldate

character string final date of the calendar, format : YYYY-MM-DD

resolution

real temporal resolution of the calendar in day, month or year (see: temporal_reso_unit). Note: for 1/2 month put temporal_reso=1/2 and temporal_reso_unit="month" , type = integer;

unit

character string temporal resolution unit. accepted value : "day" "month" "year"

Details

Values for unit can be: "day","month","year".

The algorithm can create a mi-month calendar : first period between 1st and 15th of a month, second period between 16th and the end of the month. For this set resolution=0.5 and unit="month"

Value

A dataframe with two columns : "time_start" (starting date of the period) and "time_end" (ending date of the period).

Author(s)

ChloƩ Dalleau, dalleau.chloe@hotmail.fr; modified by Paul Taconet, paul.taconet@ird.fr

See Also

Other process data: convert_units, create_grid, get_rfmos_datasets_level0, map_codelist, raise_datasets_by_dimension, raise_get_rf, raise_incomplete_dataset_to_total_dataset, rasterize_geo_timeseries, spatial_curation_downgrade_resolution, spatial_curation_intersect_areas, spatial_curation_reallocate_data, spatial_curation_upgrade_resolution

Examples


calendar<-create_calendar("1900-01-01","2020-01-01",15,"day")
calendar<-create_calendar("1900-01-01","2020-01-01",0.5,"month")


ptaconet/rtunaatlas documentation built on June 23, 2024, 9:35 p.m.