R: Calculates mean bias (difference between (max+min)/2 and...
bias
R Documentation
Calculates mean bias (difference between (max+min)/2 and 24-hour averages) in mean daily temperature series
Description
Calculates the average difference between the series of
mean daily temperatures calculated by (Tmax + Tmin) / 2
and the average calculated by 24 hourly values a day, as
resulting from the interpolation (or from measurements).
The function works on data tables with series on columns.
Usage
bias(TMIN, TMAX, TMEAN, min_valid = 21)
Arguments
TMIN
data frame with daily minimum temperatures in
columns. The first 3 columns are skipped (dates as year,
month and day are supposed to be stored in these
columns)
TMAX
same for TMAX
TMEAN
same for TMEAN. Should come from 24-hour
daily means.
min_valid
min nr. of valid days in a month for
retaining its average value (if valid days are fewer,
monthly value is NA). Default is 21.
Value
A vector of means of daily biases, where the TMEAN
is considered the "true" (reference) value
Note
Biases are calculated only on columns that are present in
both TMIN/TMAX and TMEAN
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Interpol.T)
Loading required package: date
Loading required package: chron
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Interpol.T/bias.Rd_%03d_medium.png", width=480, height=480)
> ### Name: bias
> ### Title: Calculates mean bias (difference between (max+min)/2 and 24-hour
> ### averages) in mean daily temperature series
> ### Aliases: bias
>
> ### ** Examples
>
> data(Trentino_hourly_T)
> mo_bias <- bias(TMIN = Tn, TMAX = Tx, TMEAN = Tm_list, min_valid = 20)
>
>
>
>
>
> dev.off()
null device
1
>