Learn R Programming

climtrends (version 1.0.6)

YearFuncFromDay: Annual values converted from daily values

Description

YearFuncFromDay returns annual values converted by a function from daily values.

YearMeanFromDay returns annual values averaged from daily values.

Usage

YearFuncFromDay(yearDF, datecol=1,valcol=2, yfunc=mean)

Arguments

yearDF
dataframe with climate data
datecol
column with dates
valcol
column with values
yfunc
function to apply on the data

Value

Annual values.

Examples

Run this code
# xgdcnCA008201000.dat is from ECA COLLEGEVILLE temperature
setwd(system.file('extdata/', package='climtrends'))
dailyCollegeville=ReadGHCNymd('xgdcnCA008201000.dat')
yearlyCollegeville=YearFuncFromDay(dailyCollegeville)

Run the code above in your browser using DataLab