Learn R Programming

agroclim (version 0.1.0)

tempProb: Probability of exceed a predefined temperature value

Description

Calculates the first day in the year where the probability of temperature over a threshold is higher than a predefined threshold.

Usage

tempProb(mx, dates, thres = 20, month = NULL)

Arguments

mx

vector of daily (usually maximum) temperature series.

dates

vector of dates corresponding with daily temprature series

thres

temperature threshold considered to trigger occurrence.

month

integer between 1 and 12 indicating the month to compute the probability.

Value

A numeric vector with annual values is returned.

Examples

Run this code
# NOT RUN {
  tempProb(mx = daily_tmax,
  dates = seq.Date(as.Date('1981-01-01'),
                             as.Date('2010-12-31'), by ='day'),
  thres = 20,
  month = NULL)


# }

Run the code above in your browser using DataLab