Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

outrename

Rename homogen's output files


Description

This function inserts a suffix to the output file names of homogen, to prevent them from being rewritten by any further function run.

Usage

outrename(varcli, anyi, anyf, suffix, restore=FALSE)

Arguments

varcli

Acronym of the name of the studied climatic variable, as in the data file name.

anyi

Initial year of the study period

anyf

Final year of the study period

suffix

Suffix to be inserted (or removed) in the output file names.

restore

Set this parameter to TRUE to remove the suffix previously inserted by this function.

Details

The variable (or file base) name is separated from the appended suffix by a hyphen. The purpose of this function is to allow a new application of homogen to the same data with different parameters without overwriting the previous results.

Value

This function does not return any value.

See Also

Examples

#Set a temporal working directory and write input files:
wd <- tempdir()
wd0 <- setwd(wd)
data(Ptest)
dim(dat) <- c(720,20)
dat[601:720,5] <- dat[601:720,5]*1.8
write(dat[481:720,1:5],'pcp_1991-2010.dat')
write.table(est.c[1:5,1:5],'pcp_1991-2010.est',row.names=FALSE,col.names=FALSE)
homogen('pcp',1991,2010,std=2) #homogenization
#Now run the example:
outrename('pcp',1991,2010,'ok')
#Return to user's working directory:
setwd(wd0)
#Input and output files can be found in directory:
print(wd)

climatol

Climate Tools (Series Homogenization and Derived Products)

v3.1.2
GPL (>= 2)
Authors
Jose A. Guijarro <jguijarrop@aemet.es>
Initial release
2019-08-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.