Statistical summaries of the homogenized data
Description
Listing of means, standard deviations, quantiles or trends for a
specified period, from data generated by homogen
.
Usage
1 2 3 
Arguments
varcli 
Acronym of the name of the studied climatic variable, as in the data file name. 
anyi 
Initial year of the homogenized period. 
anyf 
Final year of the homogenized period. 
anyip 
First year of the period to analyze. (Defaults to 
anyfp 
Last year of the period to analyze. (Defaults to 
stat 
Statistical parameter to compute for the selected period:

ndc 
Number of decimal places to be saved in the output file (1 by default). 
vala 
Annual values to compute from the subannual data:

cod 
Optional vector of codes of the stations to be processed. 
mnpd 
Minimum percentage of original data. (0 = no limit). 
mxsh 
Maximum SNHT. (0 = no limit). 
prob 
Probability for the computation of quantiles (0.5 by default, i.e., medians). 
last 
Logical value to compute statistics only for stations
working at the end of the period of study. ( 
long 
Logical value to compute statistics only for series built from
the longest homogeneous subperiod. ( 
mh 
If 
pernys 
Number of years on which to compute trends. (Defaults to 100). 
ini 
First date of the series, with format 
estcol 
Columns of the homogenized stations file to be included in the output file. (Defaults to 4, the column of station codes). 
sep 
String to use for separating the output data. (' '). 
dec 
Character to use as decimal point in the output data. ('.'). 
eol 
Line termination style. ('\n'). 
Details
Homogenized data are read from the file ‘VAR_ANYIANYF.rda’
saved by homogen
, while this function saves the
computed data for the specified period in ‘VAR_ANYIPANYFP.STAT’,
where STAT
is substituted by the stat
requested
statistic. An exception is when stat="q"
, since then the
extension of the output file will be qPP
, where PP
stands for the specified prob
probability (in percent).
The output period ANYIPANYFP
must of course be comprised
within the period of the input data, ANYIANYF
.
Parameters mnpd
, mxsh
and last
act as filters
to produce results only for series that have those minimum percentages
of original data and maximum SNHT values, or to select only those stations
working at the end of the period studied. No selection is performed
by default, listing the desired statistic for all the reconstructed
series (from every homogeneous subperiod).
stat='tnd'
computes trends by OLS linear regression on time, listing
them in a CSV file ‘*_tnd.csv’ and their pvalues in ‘*_pval.csv’
If stat='series'
is chosen, two text files in CSV format will be
produced for every station, one with the data and another with their flags: 0
for original, 1 for infilled and 2 for corrected data.
Value
This function does not return any value, since outputs are saved to files.
See Also
homogen
, dahgrid
.
Examples
1 2 3 4 5 6  ## Not run:
# After having run the example of the homogen function, you can do:
dahstat("Ptest", 1951, 2010, stat='tnd')
# and check the new files Ptest_19512010_tnd.csv and Ptest_19512010_pval.csv
## End(Not run)
