Learn R Programming

climtrends (version 1.0.6)

CreateReferenceSeriesFromFilesMeanCorrelations: Create a reference series (averaging weights/correlations)

Description

CreateReferenceSeriesFromFilesMeanCorrelations creates a reference series from two or more series, using weighted averages (correlations). CreateReferenceSeriesFromFilesMeanCorrelationsTwoseries is for two series only, using a simpler and faster method.

Usage

CreateReferenceSeriesFromFilesMeanCorrelations(vFiles,commonPeriod=NA, refSeriesFile=NA,wholePeriod=FALSE,useDiff=TRUE,retInfo=FALSE)

Arguments

vFiles
vector with the file names of the time series
commonPeriod
user defined common period for the resulting reference series, by default the common period to all series
refSeriesFile
reference series file name
wholePeriod
logical, common period=TRUE
useDiff
logical, raw differences=TRUE, ratios=FALSE
retInfo
logical, return reference series from function=TRUE

Value

reference series or none (if the user chose a reference series file name).

Source

Stepanek, P. 2008 AnClim - software for time series analysis Dept. of Geography, Fac. of Natural Sciences http://www.climahom.eu/AnClim.html

References

Stepanek, P. 2008 AnClim - software for time series analysis Dept. of Geography, Fac. of Natural Sciences http://www.climahom.eu/AnClim.html

Examples

Run this code
# c_As00_o.txt, c_Hori2.txt and c_Kada2.txt are from AnClim freeware distribution
setwd(system.file('extdata/', package='climtrends'))
vFiles=c('c_As00_o.txt','c_Hori2.txt','c_Kada2.txt')
refSeries=CreateReferenceSeriesFromFilesMeanCorrelations(vFiles,retInfo=TRUE)

Run the code above in your browser using DataLab