zoo2RHtest: Zoo -> RHTest

Description Usage Arguments Author(s) References Examples

View source: R/zoo2RHtest.R

Description

It creates the input file to the 'RHtest_dlyPrcp.r' script, used for testing the homogeneity of climatological time series (available at: http://etccdi.pacificclimate.org/software.shtml)

Usage

1
zoo2RHtest(x, fname="pcp.txt", tstep.out="daily", dec=".", na="-999.0")

Arguments

x

time series that will be written. class(x) must be a zoo object

fname

Character, with the filename of the precipitation time series

tstep.out

Character indicating the time step that have to be used for writing x into the output file

dec

the string to use for decimal points in numeric or complex columns: must be a single character.

na

character to be used for representing the missing values in the data

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail

References

http://etccdi.pacificclimate.org/software.shtml http://etccdi.pacificclimate.org/RHtest/RHtestsV4_UserManual_10Dec2014.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Loading the SanMartino precipitation data
data(SanMartinoPPts)
x <- SanMartinoPPts

#Getting the monthly ts
pcp.m <- daily2monthly(x, FUN=sum, na.rm=FALSE)

## Not run: 
# From zoo to the input format required by 'FindU.dlyPrcp' function
zoo2RHtest(x=pcp.m, fname="pcp-monthly.txt", tstep.out="monthly", na="-999.0")

# Homogeneity analysis
FindU.dlyPrcp(InSeries="pcp-monthly.txt", output="pcp-monthly", MissingValueCode="-999.0", 
GUI=FALSE, pthr=0, Mq=10, p.lev=0.95, Iadj=10000)

## End(Not run)

hydroTSM documentation built on March 13, 2020, 2:23 a.m.