sfreq {hydroTSM}R Documentation

Sampling Frequency

Description

This function identifies the sampling frequency of a zoo object. So far, it only works with daily/monthly/annual ts.

Usage

sfreq(x, min.year = 1800)

Arguments

x

variable of type zoo, xts or ts, with AT LEAST 2 elements, AND with a daily, monthly or annual sampling frequency.

min.year

integer used for a correct identification of the sampling frequency when x is an annual time series.

Value

Character. Possible values are:
-) daily : indicating that the sampling frequency in x is daily
-) monthly : indicating that the sampling frequency in x is monthly
-) annual : indicating that the sampling frequency in x is annual

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail

See Also

frequency

Examples

## Loading temperature data ##
## Loading daily streamflows at the station Oca en Ona (Ebro River basin, Spain) ##
data(OcaEnOnaQts)
d <- OcaEnOnaQts

## Daily to Monthly
m <- daily2monthly(d, FUN=mean, na.rm=TRUE)

## Daily to Annual
a <- daily2annual(d, FUN=mean, na.rm=TRUE)

# Daily zoo object
sfreq(d)

# Monthly zoo object
sfreq(m)

# Annual zoo object
sfreq(a)



[Package hydroTSM version 0.5-1 Index]