Learn R Programming

climtrends (version 1.0.5)

WetDayCount: Get number of wet days

Description

WetDayCount returns the number of wet days with a certain threshold in mm).

Usage

WetDayCount(yearDF, datecol, valcol, vthreshold)

Arguments

yearDF
dataframe with climate data
datecol
column with dates
valcol
column with precipitation data
vthreshold
threshold in mm

Value

  • number of wet days.

Examples

Run this code
setwd(system.file('extdata/', package='climtrends'))
z<-ReadECAdata('RR_SOUID101991.txt')
d1900.2000<-z[which(z[,1]<'2001-01-01'),]
d1900.2000<-d1900.2000[which(d1900.2000[,1]>='1900-01-01'),]
y1900.2000w<-WetDayCount(d1900.2000,1,2,10)

Run the code above in your browser using DataLab