Learn R Programming

agroclim (version 0.3.0)

frostDays: Number of frost days

Description

Calculates the number of frost days within a predefined period.

Usage

frostDays(mn, dates, iniday = "07-01", endday = "06-30", thres = 0)

Value

A numeric vector with the annual number of frost days is returned.

Arguments

mn

vector of daily minimum temperature series.

dates

vector of dates corresponding with daily temprature series

iniday

first day of the year ("dd-mm") when frost occurrence will be considered.

endday

last day of the year ("dd-mm") when frost occurrence will be considered.

thres

temperature threshold considered to trigger frost occurrence (0 by default).

Details

Despite the logical threshold of temperature is 0 ºC to determine frost occurrence, the argument "thres" is open to change in case of different units of temperature.

Examples

Run this code


frostDays(mn = daily_tmin,
           dates = seq.Date(as.Date('1981-01-01'),
                             as.Date('2010-12-31'), by ='day'),
           iniday = '07-01',
           endday = '06-30')

Run the code above in your browser using DataLab