
Counting Missing Values
cmv.RdGeneric function for counting the percentage/amount of missing values in a zoo object, using a user-defined temporal scale.
Usage
cmv(x, ...)
# Default S3 method
cmv(x, tscale=c("hourly", "daily", "weekly", "monthly",
"quarterly", "seasonal", "annual"),
out.type=c("percentage", "amount"), dec=3,
start="00:00:00", start.fmt= "%H:%M:%S", tz,
start.month=1, ...)
# S3 method for class 'zoo'
cmv(x, tscale=c("hourly", "daily", "weekly", "monthly",
"quarterly", "seasonal", "annual"),
out.type=c("percentage", "amount"), dec=3,
start="00:00:00", start.fmt= "%H:%M:%S", tz,
start.month=1, ...)
# S3 method for class 'data.frame'
cmv(x, tscale=c("hourly", "daily", "weekly", "monthly",
"quarterly", "seasonal", "annual"),
out.type=c("percentage", "amount"), dec=3,
start="00:00:00", start.fmt= "%H:%M:%S", tz,
start.month=1, dates=1, date.fmt="%Y-%m-%d", ...)
# S3 method for class 'matrix'
cmv(x, tscale=c("hourly", "daily", "weekly", "monthly",
"quarterly", "seasonal", "annual"),
out.type=c("percentage", "amount"), dec=3,
start="00:00:00", start.fmt= "%H:%M:%S", tz,
start.month=1, dates=1, date.fmt="%Y-%m-%d", ...)Arguments
- x
zoo, data.frame or matrix object, with the time series to be analised.
Measurements at several gauging stations can be stored in a data.frame or matrix object, and in that case, each column ofxrepresents the time series measured in a gauging statio, and the column names ofxhave to correspond to the ID of each station (starting by a letter).- tscale
character with the temporal scale to be used for analysing the mssing data. Valid values are:
-) hourly: the percentage/amount of missing values will be given for each hour and ,therefore, the expected time frequency ofxmust be sub-hourly.
-) daily: the percentage/amount of missing values will be given for each day and, therefore, the expected time frequency ofxmust be sub-daily (i.e., hourly or sub-hourly).
-) weekly: the percentage/amount of missing values will be given for each week (starting on Monday) and, therefore, the expected time frequency ofxmust be sub-weekly (i.e., daily, (sub)hourly).
-) monthly: the percentage/amount of missing values will be given for each month and, therefore, the expected time frequency ofxmust be sub-monthly (i.e., daily, hourly or sub-hourly).
-) quarterly: the percentage/amount of missing values will be given for each quarter and, therefore, the expected time frequency ofxmust be sub-quarterly (i.e., monthly, daily, hourly or sub-hourly).
-) seasonal: the percentage/amount of missing values will be given for each weather season (see ?time2season) and, therefore, the expected time frequency ofxmust be sub-seasonal (i.e., monthly, daily, hourly or sub-hourly).
-) annual: the percentage/amount of missing values will be given for each year and, therefore, the expected time frequency ofxmust be sub-annual (i.e., seasonal, monthly, daily, hourly or sub-hourly).- dec
integer indicating the amount of decimal places included in the output.
It is only used whenout.type=='percentage'.- start
character, indicating the starting time used for aggregating sub-daily time series into daily ones. It MUST be provided in the format specified by
start.fmt.
This value is used to define the time when a new day begins (e.g., for some rain gauge stations).
-) All the values ofxwith a time attribute beforestartare considered as belonging to the day before the one indicated in the time attribute of those values.
-) All the values ofxwith a time attribute equal tostartare considered to be equal to"00:00:00"in the output zoo object.
-) All the values ofxwith a time attribute afterstartare considered as belonging to the same day as the one indicated in the time attribute of those values.It is useful when the daily values start at a time different from
"00:00:00". Use with caution. See examples.- start.fmt
character indicating the format in which the time is provided in
start, By defaultdate.fmt=%H:%M:%S. Seeformatinas.POSIXct.- start.month
numeric in [1,..,12], representing the starting month (1:Jan, ..., 12:Dec) to be used in the computation of annual values. By default
start.month=1.- tz
character, with the specification of the time zone used in both
xandstart. System-specific (see time zones), but""is the current time zone, and"GMT"is UTC (Universal Time, Coordinated). SeeSys.timezoneandas.POSIXct.
Iftzis missing (the default), it is automatically set to the time zone used intime(x).
This argument can be used to force using the local time zone or any other time zone instead of UTC as time zone.- dates
numeric, factor, POSIXct or POSIXt object indicating how to obtain the dates and times for each column of
x(e.g., gauging station).
Ifdatesis a number, it indicates the index of the column inxthat stores the date and times.
Ifdatesis a factor, it is converted into POSIXct class, using the date format specified bydate.fmt
Ifdatesis already of POSIXct or POSIXt class, this function verifies that the number of elements on it be equal to the number of elements inx.- date.fmt
character indicating the format in which the dates are stored in
dates, By defaultdate.fmt=%Y-%m-%d %H:%M:%S. Seeformatinas.Date.
ONLY required whenclass(dates)=="factor"orclass(dates)=="numeric".- out.type
character indicating how should be returned the missing values for each temporal scale. Valid values are:
-) percentage: the missing values are returned as an real value, representing the percentage of missing values in each temporal scale.
-) amount: the missing values are returned as an integer value, representing the absolute amount of missing values in each temporal scale.- ...
further arguments passed to or from other methods.
Details
The amount of missing values in each temporal scale is computed just by counting the amount of NAs in each hour / day / week / month / quarter / season / year, while the percentage of missing values in each temporal scale is computed by dividing the previous number by the total number of data elements in each hour / day / week / month / quarter / season / year.
This function was developed to allow the selective removal of values when agregting from a high temporal resolution into a lower temporal resolution (e.g., from hourly to daily or from daily to monthly), using any of the temporal aggregation functions available int his package (e.g., hourly2daily, daily2monthly)
Value
a zoo object with the percentage/amount of missing values for each temporal scale selected by the user.
Author
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
Examples
######################
## Ex1: Loading the DAILY precipitation data at SanMartino (25567 daily values)
data(SanMartinoPPts)
x <- SanMartinoPPts
# Subsetting to only the 1981-1990 temporal period
x <- window(x, start="1981-01-01", end="1990-12-31")
## Transforming into NA the 10% of values in 'x'
n <- length(x)
n.nas <- round(0.1*n, 0)
na.index <- sample(1:n, n.nas)
x[na.index] <- NA
# Getting the amount of NAs in 'x' for each week (starting on Monday)
cmv(x, tscale="weekly")
#> 1981-00 1981-01 1981-02 1981-03 1981-04 1981-05 1981-06 1981-07 1981-08 1981-09
#> 0.000 0.143 0.143 0.143 0.000 0.000 0.429 0.143 0.143 0.143
#> 1981-10 1981-11 1981-12 1981-13 1981-14 1981-15 1981-16 1981-17 1981-18 1981-19
#> 0.143 0.143 0.143 0.000 0.286 0.000 0.000 0.000 0.143 0.000
#> 1981-20 1981-21 1981-22 1981-23 1981-24 1981-25 1981-26 1981-27 1981-28 1981-29
#> 0.286 0.143 0.000 0.000 0.143 0.143 0.143 0.000 0.143 0.143
#> 1981-30 1981-31 1981-32 1981-33 1981-34 1981-35 1981-36 1981-37 1981-38 1981-39
#> 0.143 0.000 0.000 0.000 0.286 0.000 0.000 0.000 0.143 0.000
#> 1981-40 1981-41 1981-42 1981-43 1981-44 1981-45 1981-46 1981-47 1981-48 1981-49
#> 0.000 0.286 0.143 0.000 0.000 0.000 0.143 0.000 0.000 0.143
#> 1981-50 1981-51 1981-52 1982-00 1982-01 1982-02 1982-03 1982-04 1982-05 1982-06
#> 0.000 0.000 0.000 0.000 0.000 0.000 0.286 0.286 0.000 0.000
#> 1982-07 1982-08 1982-09 1982-10 1982-11 1982-12 1982-13 1982-14 1982-15 1982-16
#> 0.000 0.286 0.000 0.143 0.000 0.000 0.143 0.000 0.286 0.143
#> 1982-17 1982-18 1982-19 1982-20 1982-21 1982-22 1982-23 1982-24 1982-25 1982-26
#> 0.143 0.000 0.143 0.286 0.000 0.143 0.143 0.143 0.143 0.286
#> 1982-27 1982-28 1982-29 1982-30 1982-31 1982-32 1982-33 1982-34 1982-35 1982-36
#> 0.143 0.000 0.000 0.286 0.143 0.143 0.143 0.286 0.000 0.143
#> 1982-37 1982-38 1982-39 1982-40 1982-41 1982-42 1982-43 1982-44 1982-45 1982-46
#> 0.000 0.000 0.000 0.286 0.000 0.143 0.286 0.143 0.000 0.000
#> 1982-47 1982-48 1982-49 1982-50 1982-51 1982-52 1983-00 1983-01 1983-02 1983-03
#> 0.000 0.143 0.000 0.000 0.000 0.200 0.000 0.143 0.143 0.286
#> 1983-04 1983-05 1983-06 1983-07 1983-08 1983-09 1983-10 1983-11 1983-12 1983-13
#> 0.000 0.000 0.143 0.000 0.000 0.143 0.000 0.143 0.000 0.143
#> 1983-14 1983-15 1983-16 1983-17 1983-18 1983-19 1983-20 1983-21 1983-22 1983-23
#> 0.000 0.429 0.286 0.000 0.143 0.000 0.143 0.143 0.143 0.000
#> 1983-24 1983-25 1983-26 1983-27 1983-28 1983-29 1983-30 1983-31 1983-32 1983-33
#> 0.143 0.000 0.000 0.000 0.000 0.143 0.000 0.000 0.286 0.000
#> 1983-34 1983-35 1983-36 1983-37 1983-38 1983-39 1983-40 1983-41 1983-42 1983-43
#> 0.143 0.143 0.143 0.143 0.000 0.143 0.143 0.143 0.286 0.000
#> 1983-44 1983-45 1983-46 1983-47 1983-48 1983-49 1983-50 1983-51 1983-52 1984-00
#> 0.000 0.000 0.143 0.000 0.000 0.143 0.000 0.143 0.167 0.000
#> 1984-01 1984-02 1984-03 1984-04 1984-05 1984-06 1984-07 1984-08 1984-09 1984-10
#> 0.143 0.000 0.286 0.000 0.000 0.000 0.000 0.000 0.143 0.286
#> 1984-11 1984-12 1984-13 1984-14 1984-15 1984-16 1984-17 1984-18 1984-19 1984-20
#> 0.000 0.000 0.000 0.000 0.143 0.143 0.000 0.143 0.143 0.000
#> 1984-21 1984-22 1984-23 1984-24 1984-25 1984-26 1984-27 1984-28 1984-29 1984-30
#> 0.286 0.000 0.000 0.143 0.000 0.143 0.000 0.286 0.000 0.000
#> 1984-31 1984-32 1984-33 1984-34 1984-35 1984-36 1984-37 1984-38 1984-39 1984-40
#> 0.143 0.143 0.000 0.286 0.000 0.000 0.000 0.000 0.000 0.000
#> 1984-41 1984-42 1984-43 1984-44 1984-45 1984-46 1984-47 1984-48 1984-49 1984-50
#> 0.000 0.000 0.143 0.286 0.143 0.000 0.143 0.143 0.000 0.143
#> 1984-51 1984-52 1984-53 1985-00 1985-01 1985-02 1985-03 1985-04 1985-05 1985-06
#> 0.000 0.000 0.000 0.167 0.000 0.143 0.000 0.429 0.000 0.143
#> 1985-07 1985-08 1985-09 1985-10 1985-11 1985-12 1985-13 1985-14 1985-15 1985-16
#> 0.286 0.143 0.000 0.000 0.143 0.286 0.143 0.286 0.143 0.143
#> 1985-17 1985-18 1985-19 1985-20 1985-21 1985-22 1985-23 1985-24 1985-25 1985-26
#> 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.143 0.000 0.000
#> 1985-27 1985-28 1985-29 1985-30 1985-31 1985-32 1985-33 1985-34 1985-35 1985-36
#> 0.000 0.143 0.000 0.000 0.429 0.143 0.143 0.000 0.000 0.000
#> 1985-37 1985-38 1985-39 1985-40 1985-41 1985-42 1985-43 1985-44 1985-45 1985-46
#> 0.000 0.000 0.143 0.000 0.000 0.143 0.000 0.000 0.000 0.000
#> 1985-47 1985-48 1985-49 1985-50 1985-51 1985-52 1986-00 1986-01 1986-02 1986-03
#> 0.286 0.143 0.000 0.143 0.286 0.000 0.600 0.143 0.143 0.000
#> 1986-04 1986-05 1986-06 1986-07 1986-08 1986-09 1986-10 1986-11 1986-12 1986-13
#> 0.143 0.000 0.286 0.143 0.143 0.286 0.286 0.000 0.000 0.143
#> 1986-14 1986-15 1986-16 1986-17 1986-18 1986-19 1986-20 1986-21 1986-22 1986-23
#> 0.143 0.000 0.143 0.000 0.000 0.000 0.000 0.000 0.143 0.000
#> 1986-24 1986-25 1986-26 1986-27 1986-28 1986-29 1986-30 1986-31 1986-32 1986-33
#> 0.143 0.000 0.000 0.286 0.429 0.429 0.571 0.143 0.286 0.143
#> 1986-34 1986-35 1986-36 1986-37 1986-38 1986-39 1986-40 1986-41 1986-42 1986-43
#> 0.286 0.143 0.143 0.286 0.286 0.143 0.143 0.000 0.000 0.143
#> 1986-44 1986-45 1986-46 1986-47 1986-48 1986-49 1986-50 1986-51 1986-52 1987-00
#> 0.143 0.000 0.000 0.000 0.286 0.143 0.143 0.000 0.333 0.250
#> 1987-01 1987-02 1987-03 1987-04 1987-05 1987-06 1987-07 1987-08 1987-09 1987-10
#> 0.143 0.143 0.143 0.000 0.000 0.000 0.000 0.286 0.143 0.000
#> 1987-11 1987-12 1987-13 1987-14 1987-15 1987-16 1987-17 1987-18 1987-19 1987-20
#> 0.000 0.000 0.143 0.143 0.000 0.000 0.143 0.286 0.000 0.000
#> 1987-21 1987-22 1987-23 1987-24 1987-25 1987-26 1987-27 1987-28 1987-29 1987-30
#> 0.000 0.000 0.143 0.286 0.000 0.000 0.000 0.143 0.000 0.143
#> 1987-31 1987-32 1987-33 1987-34 1987-35 1987-36 1987-37 1987-38 1987-39 1987-40
#> 0.143 0.000 0.000 0.000 0.000 0.143 0.143 0.143 0.000 0.000
#> 1987-41 1987-42 1987-43 1987-44 1987-45 1987-46 1987-47 1987-48 1987-49 1987-50
#> 0.000 0.000 0.286 0.286 0.429 0.000 0.143 0.143 0.143 0.286
#> 1987-51 1987-52 1988-00 1988-01 1988-02 1988-03 1988-04 1988-05 1988-06 1988-07
#> 0.000 0.000 0.000 0.143 0.000 0.143 0.429 0.429 0.000 0.143
#> 1988-08 1988-09 1988-10 1988-11 1988-12 1988-13 1988-14 1988-15 1988-16 1988-17
#> 0.143 0.000 0.286 0.286 0.000 0.286 0.143 0.000 0.000 0.000
#> 1988-18 1988-19 1988-20 1988-21 1988-22 1988-23 1988-24 1988-25 1988-26 1988-27
#> 0.000 0.000 0.143 0.286 0.000 0.000 0.286 0.286 0.286 0.143
#> 1988-28 1988-29 1988-30 1988-31 1988-32 1988-33 1988-34 1988-35 1988-36 1988-37
#> 0.143 0.000 0.000 0.286 0.000 0.143 0.286 0.000 0.429 0.000
#> 1988-38 1988-39 1988-40 1988-41 1988-42 1988-43 1988-44 1988-45 1988-46 1988-47
#> 0.286 0.000 0.000 0.286 0.000 0.143 0.000 0.286 0.143 0.143
#> 1988-48 1988-49 1988-50 1988-51 1988-52 1989-00 1989-01 1989-02 1989-03 1989-04
#> 0.143 0.000 0.000 0.000 0.167 0.000 0.286 0.000 0.000 0.143
#> 1989-05 1989-06 1989-07 1989-08 1989-09 1989-10 1989-11 1989-12 1989-13 1989-14
#> 0.000 0.000 0.000 0.429 0.000 0.000 0.143 0.286 0.000 0.286
#> 1989-15 1989-16 1989-17 1989-18 1989-19 1989-20 1989-21 1989-22 1989-23 1989-24
#> 0.143 0.000 0.000 0.143 0.000 0.000 0.286 0.143 0.143 0.000
#> 1989-25 1989-26 1989-27 1989-28 1989-29 1989-30 1989-31 1989-32 1989-33 1989-34
#> 0.000 0.286 0.000 0.143 0.000 0.000 0.143 0.000 0.000 0.000
#> 1989-35 1989-36 1989-37 1989-38 1989-39 1989-40 1989-41 1989-42 1989-43 1989-44
#> 0.143 0.000 0.143 0.286 0.000 0.000 0.000 0.286 0.143 0.000
#> 1989-45 1989-46 1989-47 1989-48 1989-49 1989-50 1989-51 1989-52 1990-01 1990-02
#> 0.286 0.143 0.000 0.143 0.000 0.143 0.000 0.143 0.286 0.000
#> 1990-03 1990-04 1990-05 1990-06 1990-07 1990-08 1990-09 1990-10 1990-11 1990-12
#> 0.000 0.000 0.286 0.143 0.143 0.286 0.000 0.000 0.143 0.000
#> 1990-13 1990-14 1990-15 1990-16 1990-17 1990-18 1990-19 1990-20 1990-21 1990-22
#> 0.143 0.143 0.000 0.143 0.000 0.000 0.000 0.000 0.286 0.143
#> 1990-23 1990-24 1990-25 1990-26 1990-27 1990-28 1990-29 1990-30 1990-31 1990-32
#> 0.000 0.143 0.000 0.143 0.000 0.143 0.143 0.143 0.143 0.000
#> 1990-33 1990-34 1990-35 1990-36 1990-37 1990-38 1990-39 1990-40 1990-41 1990-42
#> 0.000 0.143 0.143 0.286 0.143 0.143 0.000 0.143 0.000 0.000
#> 1990-43 1990-44 1990-45 1990-46 1990-47 1990-48 1990-49 1990-50 1990-51 1990-52
#> 0.000 0.286 0.000 0.000 0.286 0.000 0.000 0.286 0.143 0.143
#> 1990-53
#> 0.000
# Getting the amount of NAs in 'x' for each month
cmv(x, tscale="monthly")
#> 1981-01 1981-02 1981-03 1981-04 1981-05 1981-06 1981-07 1981-08 1981-09 1981-10
#> 0.097 0.179 0.129 0.067 0.129 0.100 0.097 0.065 0.033 0.097
#> 1981-11 1981-12 1982-01 1982-02 1982-03 1982-04 1982-05 1982-06 1982-07 1982-08
#> 0.033 0.032 0.129 0.071 0.032 0.167 0.097 0.167 0.129 0.161
#> 1982-09 1982-10 1982-11 1982-12 1983-01 1983-02 1983-03 1983-04 1983-05 1983-06
#> 0.033 0.161 0.033 0.065 0.129 0.036 0.097 0.167 0.097 0.067
#> 1983-07 1983-08 1983-09 1983-10 1983-11 1983-12 1984-01 1984-02 1984-03 1984-04
#> 0.032 0.129 0.067 0.161 0.033 0.097 0.097 0.000 0.097 0.067
#> 1984-05 1984-06 1984-07 1984-08 1984-09 1984-10 1984-11 1984-12 1985-01 1985-02
#> 0.129 0.067 0.065 0.129 0.000 0.065 0.100 0.065 0.097 0.179
#> 1985-03 1985-04 1985-05 1985-06 1985-07 1985-08 1985-09 1985-10 1985-11 1985-12
#> 0.129 0.167 0.000 0.033 0.032 0.161 0.000 0.065 0.067 0.129
#> 1986-01 1986-02 1986-03 1986-04 1986-05 1986-06 1986-07 1986-08 1986-09 1986-10
#> 0.194 0.143 0.129 0.100 0.000 0.067 0.323 0.258 0.200 0.097
#> 1986-11 1986-12 1987-01 1987-02 1987-03 1987-04 1987-05 1987-06 1987-07 1987-08
#> 0.033 0.161 0.129 0.071 0.032 0.067 0.097 0.100 0.032 0.065
#> 1987-09 1987-10 1987-11 1987-12 1988-01 1988-02 1988-03 1988-04 1988-05 1988-06
#> 0.100 0.065 0.200 0.129 0.161 0.172 0.194 0.033 0.097 0.167
#> 1988-07 1988-08 1988-09 1988-10 1988-11 1988-12 1989-01 1989-02 1989-03 1989-04
#> 0.097 0.161 0.167 0.097 0.167 0.032 0.097 0.107 0.097 0.100
#> 1989-05 1989-06 1989-07 1989-08 1989-09 1989-10 1989-11 1989-12 1990-01 1990-02
#> 0.097 0.100 0.097 0.032 0.100 0.097 0.133 0.065 0.097 0.179
#> 1990-03 1990-04 1990-05 1990-06 1990-07 1990-08 1990-09 1990-10 1990-11 1990-12
#> 0.065 0.067 0.065 0.100 0.129 0.065 0.133 0.065 0.100 0.129
# Getting the amount of NAs in 'x' for each quarter
cmv(x, tscale="quarterly")
#> 1981 Q1 1981 Q2 1981 Q3 1981 Q4 1982 Q1 1982 Q2 1982 Q3 1982 Q4 1983 Q1 1983 Q2
#> 0.133 0.099 0.065 0.054 0.078 0.143 0.109 0.087 0.089 0.110
#> 1983 Q3 1983 Q4 1984 Q1 1984 Q2 1984 Q3 1984 Q4 1985 Q1 1985 Q2 1985 Q3 1985 Q4
#> 0.076 0.098 0.066 0.088 0.065 0.076 0.133 0.066 0.065 0.087
#> 1986 Q1 1986 Q2 1986 Q3 1986 Q4 1987 Q1 1987 Q2 1987 Q3 1987 Q4 1988 Q1 1988 Q2
#> 0.156 0.055 0.261 0.098 0.078 0.088 0.065 0.130 0.176 0.099
#> 1988 Q3 1988 Q4 1989 Q1 1989 Q2 1989 Q3 1989 Q4 1990 Q1 1990 Q2 1990 Q3 1990 Q4
#> 0.141 0.098 0.100 0.099 0.076 0.098 0.111 0.077 0.109 0.098
# Getting the amount of NAs in 'x' for each weather season
cmv(x, tscale="seasonal")
#> 1981-DJF 1981-JJA 1981-MAM 1981-SON 1982-DJF 1982-JJA 1982-MAM 1982-SON
#> 0.100 0.087 0.109 0.055 0.089 0.152 0.098 0.077
#> 1983-DJF 1983-JJA 1983-MAM 1983-SON 1984-DJF 1984-JJA 1984-MAM 1984-SON
#> 0.089 0.076 0.120 0.088 0.055 0.087 0.098 0.055
#> 1985-DJF 1985-JJA 1985-MAM 1985-SON 1986-DJF 1986-JJA 1986-MAM 1986-SON
#> 0.133 0.076 0.098 0.044 0.167 0.217 0.076 0.110
#> 1987-DJF 1987-JJA 1987-MAM 1987-SON 1988-DJF 1988-JJA 1988-MAM 1988-SON
#> 0.111 0.065 0.065 0.121 0.121 0.141 0.109 0.143
#> 1989-DJF 1989-JJA 1989-MAM 1989-SON 1990-DJF 1990-JJA 1990-MAM 1990-SON
#> 0.089 0.076 0.098 0.110 0.133 0.098 0.065 0.099
# Getting the amount of NAs in 'x' for each year
cmv(x, tscale="annual")
#> 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990
#> 0.088 0.104 0.093 0.074 0.088 0.142 0.090 0.128 0.093 0.099
######################
## Ex2: Loading the time series of HOURLY streamflows for the station
## Karamea at Gorge (52579 hourly values)
data(KarameaAtGorgeQts)
x <- KarameaAtGorgeQts
# Subsetting to only the first two years (1981-1982)
x <- window(x, end=as.POSIXct("1982-12-31 23:59:00", tz="UTC") )
## Transforming into NA the 30% of values in 'x'
n <- length(x)
n.nas <- round(0.1*n, 0)
na.index <- sample(1:n, n.nas)
x[na.index] <- NA
# Getting the amount of NAs in 'x' for each day
cmv(x, tscale="daily")
#>
#> 1979-12-31 0.250
#> 1980-01-01 0.042
#> 1980-01-02 0.167
#> 1980-01-03 0.042
#> 1980-01-04 0.125
#> 1980-01-05 0.125
#> 1980-01-06 0.042
#> 1980-01-07 0.208
#> 1980-01-08 0.125
#> 1980-01-09 0.083
#> 1980-01-10 0.125
#> 1980-01-11 0.083
#> 1980-01-12 0.000
#> 1980-01-13 0.000
#> 1980-01-14 0.042
#> 1980-01-15 0.083
#> 1980-01-16 0.042
#> 1980-01-17 0.000
#> 1980-01-18 0.042
#> 1980-01-19 0.042
#> 1980-01-20 0.083
#> 1980-01-21 0.167
#> 1980-01-22 0.000
#> 1980-01-23 0.125
#> 1980-01-24 0.250
#> 1980-01-25 0.125
#> 1980-01-26 0.042
#> 1980-01-27 0.042
#> 1980-01-28 0.000
#> 1980-01-29 0.000
#> 1980-01-30 0.208
#> 1980-01-31 0.042
#> 1980-02-01 0.167
#> 1980-02-02 0.083
#> 1980-02-03 0.083
#> 1980-02-04 0.042
#> 1980-02-05 0.083
#> 1980-02-06 0.208
#> 1980-02-07 0.125
#> 1980-02-08 0.042
#> 1980-02-09 0.167
#> 1980-02-10 0.250
#> 1980-02-11 0.125
#> 1980-02-12 0.042
#> 1980-02-13 0.125
#> 1980-02-14 0.125
#> 1980-02-15 0.167
#> 1980-02-16 0.125
#> 1980-02-17 0.042
#> 1980-02-18 0.042
#> 1980-02-19 0.042
#> 1980-02-20 0.042
#> 1980-02-21 0.125
#> 1980-02-22 0.125
#> 1980-02-23 0.167
#> 1980-02-24 0.083
#> 1980-02-25 0.083
#> 1980-02-26 0.042
#> 1980-02-27 0.083
#> 1980-02-28 0.125
#> 1980-02-29 0.042
#> 1980-03-01 0.083
#> 1980-03-02 0.125
#> 1980-03-03 0.125
#> 1980-03-04 0.167
#> 1980-03-05 0.125
#> 1980-03-06 0.042
#> 1980-03-07 0.083
#> 1980-03-08 0.042
#> 1980-03-09 0.083
#> 1980-03-10 0.208
#> 1980-03-11 0.083
#> 1980-03-12 0.083
#> 1980-03-13 0.125
#> 1980-03-14 0.125
#> 1980-03-15 0.083
#> 1980-03-16 0.083
#> 1980-03-17 0.042
#> 1980-03-18 0.125
#> 1980-03-19 0.083
#> 1980-03-20 0.125
#> 1980-03-21 0.083
#> 1980-03-22 0.208
#> 1980-03-23 0.167
#> 1980-03-24 0.083
#> 1980-03-25 0.083
#> 1980-03-26 0.042
#> 1980-03-27 0.083
#> 1980-03-28 0.042
#> 1980-03-29 0.000
#> 1980-03-30 0.042
#> 1980-03-31 0.042
#> 1980-04-01 0.042
#> 1980-04-02 0.125
#> 1980-04-03 0.083
#> 1980-04-04 0.083
#> 1980-04-05 0.083
#> 1980-04-06 0.083
#> 1980-04-07 0.125
#> 1980-04-08 0.167
#> 1980-04-09 0.042
#> 1980-04-10 0.083
#> 1980-04-11 0.167
#> 1980-04-12 0.083
#> 1980-04-13 0.167
#> 1980-04-14 0.125
#> 1980-04-15 0.208
#> 1980-04-16 0.042
#> 1980-04-17 0.042
#> 1980-04-18 0.125
#> 1980-04-19 0.042
#> 1980-04-20 0.083
#> 1980-04-21 0.083
#> 1980-04-22 0.125
#> 1980-04-23 0.083
#> 1980-04-24 0.083
#> 1980-04-25 0.208
#> 1980-04-26 0.042
#> 1980-04-27 0.042
#> 1980-04-28 0.125
#> 1980-04-29 0.083
#> 1980-04-30 0.083
#> 1980-05-01 0.125
#> 1980-05-02 0.167
#> 1980-05-03 0.083
#> 1980-05-04 0.167
#> 1980-05-05 0.125
#> 1980-05-06 0.083
#> 1980-05-07 0.042
#> 1980-05-08 0.042
#> 1980-05-09 0.083
#> 1980-05-10 0.125
#> 1980-05-11 0.167
#> 1980-05-12 0.042
#> 1980-05-13 0.042
#> 1980-05-14 0.208
#> 1980-05-15 0.167
#> 1980-05-16 0.083
#> 1980-05-17 0.042
#> 1980-05-18 0.167
#> 1980-05-19 0.125
#> 1980-05-20 0.000
#> 1980-05-21 0.083
#> 1980-05-22 0.042
#> 1980-05-23 0.083
#> 1980-05-24 0.083
#> 1980-05-25 0.000
#> 1980-05-26 0.042
#> 1980-05-27 0.125
#> 1980-05-28 0.083
#> 1980-05-29 0.042
#> 1980-05-30 0.083
#> 1980-05-31 0.083
#> 1980-06-01 0.083
#> 1980-06-02 0.042
#> 1980-06-03 0.083
#> 1980-06-04 0.083
#> 1980-06-05 0.000
#> 1980-06-06 0.125
#> 1980-06-07 0.167
#> 1980-06-08 0.042
#> 1980-06-09 0.125
#> 1980-06-10 0.167
#> 1980-06-11 0.167
#> 1980-06-12 0.042
#> 1980-06-13 0.125
#> 1980-06-14 0.083
#> 1980-06-15 0.125
#> 1980-06-16 0.083
#> 1980-06-17 0.208
#> 1980-06-18 0.042
#> 1980-06-19 0.167
#> 1980-06-20 0.167
#> 1980-06-21 0.125
#> 1980-06-22 0.042
#> 1980-06-23 0.083
#> 1980-06-24 0.083
#> 1980-06-25 0.042
#> 1980-06-26 0.125
#> 1980-06-27 0.208
#> 1980-06-28 0.042
#> 1980-06-29 0.125
#> 1980-06-30 0.125
#> 1980-07-01 0.000
#> 1980-07-02 0.125
#> 1980-07-03 0.083
#> 1980-07-04 0.083
#> 1980-07-05 0.208
#> 1980-07-06 0.167
#> 1980-07-07 0.125
#> 1980-07-08 0.083
#> 1980-07-09 0.167
#> 1980-07-10 0.125
#> 1980-07-11 0.083
#> 1980-07-12 0.125
#> 1980-07-13 0.083
#> 1980-07-14 0.125
#> 1980-07-15 0.083
#> 1980-07-16 0.083
#> 1980-07-17 0.042
#> 1980-07-18 0.083
#> 1980-07-19 0.083
#> 1980-07-20 0.042
#> 1980-07-21 0.042
#> 1980-07-22 0.208
#> 1980-07-23 0.083
#> 1980-07-24 0.167
#> 1980-07-25 0.083
#> 1980-07-26 0.083
#> 1980-07-27 0.000
#> 1980-07-28 0.042
#> 1980-07-29 0.042
#> 1980-07-30 0.125
#> 1980-07-31 0.042
#> 1980-08-01 0.125
#> 1980-08-02 0.208
#> 1980-08-03 0.000
#> 1980-08-04 0.083
#> 1980-08-05 0.125
#> 1980-08-06 0.125
#> 1980-08-07 0.125
#> 1980-08-08 0.042
#> 1980-08-09 0.083
#> 1980-08-10 0.125
#> 1980-08-11 0.083
#> 1980-08-12 0.042
#> 1980-08-13 0.125
#> 1980-08-14 0.125
#> 1980-08-15 0.000
#> 1980-08-16 0.083
#> 1980-08-17 0.125
#> 1980-08-18 0.083
#> 1980-08-19 0.083
#> 1980-08-20 0.083
#> 1980-08-21 0.000
#> 1980-08-22 0.125
#> 1980-08-23 0.042
#> 1980-08-24 0.042
#> 1980-08-25 0.042
#> 1980-08-26 0.208
#> 1980-08-27 0.083
#> 1980-08-28 0.125
#> 1980-08-29 0.083
#> 1980-08-30 0.042
#> 1980-08-31 0.292
#> 1980-09-01 0.083
#> 1980-09-02 0.042
#> 1980-09-03 0.083
#> 1980-09-04 0.042
#> 1980-09-05 0.083
#> 1980-09-06 0.083
#> 1980-09-07 0.083
#> 1980-09-08 0.167
#> 1980-09-09 0.167
#> 1980-09-10 0.083
#> 1980-09-11 0.083
#> 1980-09-12 0.042
#> 1980-09-13 0.125
#> 1980-09-14 0.167
#> 1980-09-15 0.125
#> 1980-09-16 0.167
#> 1980-09-17 0.167
#> 1980-09-18 0.208
#> 1980-09-19 0.042
#> 1980-09-20 0.083
#> 1980-09-21 0.125
#> 1980-09-22 0.208
#> 1980-09-23 0.167
#> 1980-09-24 0.083
#> 1980-09-25 0.125
#> 1980-09-26 0.292
#> 1980-09-27 0.087
#> 1980-09-28 0.125
#> 1980-09-29 0.167
#> 1980-09-30 0.208
#> 1980-10-01 0.125
#> 1980-10-02 0.125
#> 1980-10-03 0.083
#> 1980-10-04 0.042
#> 1980-10-05 0.167
#> 1980-10-06 0.083
#> 1980-10-07 0.042
#> 1980-10-08 0.083
#> 1980-10-09 0.042
#> 1980-10-10 0.167
#> 1980-10-11 0.125
#> 1980-10-12 0.043
#> 1980-10-13 0.083
#> 1980-10-14 0.167
#> 1980-10-15 0.125
#> 1980-10-16 0.083
#> 1980-10-17 0.125
#> 1980-10-18 0.042
#> 1980-10-19 0.083
#> 1980-10-20 0.083
#> 1980-10-21 0.125
#> 1980-10-22 0.083
#> 1980-10-23 0.000
#> 1980-10-24 0.083
#> 1980-10-25 0.083
#> 1980-10-26 0.083
#> 1980-10-27 0.000
#> 1980-10-28 0.125
#> 1980-10-29 0.125
#> 1980-10-30 0.000
#> 1980-10-31 0.000
#> 1980-11-01 0.167
#> 1980-11-02 0.042
#> 1980-11-03 0.042
#> 1980-11-04 0.125
#> 1980-11-05 0.042
#> 1980-11-06 0.042
#> 1980-11-07 0.083
#> 1980-11-08 0.167
#> 1980-11-09 0.042
#> 1980-11-10 0.083
#> 1980-11-11 0.000
#> 1980-11-12 0.083
#> 1980-11-13 0.208
#> 1980-11-14 0.042
#> 1980-11-15 0.125
#> 1980-11-16 0.042
#> 1980-11-17 0.000
#> 1980-11-18 0.083
#> 1980-11-19 0.042
#> 1980-11-20 0.292
#> 1980-11-21 0.125
#> 1980-11-22 0.083
#> 1980-11-23 0.125
#> 1980-11-24 0.000
#> 1980-11-25 0.083
#> 1980-11-26 0.125
#> 1980-11-27 0.042
#> 1980-11-28 0.208
#> 1980-11-29 0.000
#> 1980-11-30 0.125
#> 1980-12-01 0.167
#> 1980-12-02 0.000
#> 1980-12-03 0.042
#> 1980-12-04 0.042
#> 1980-12-05 0.083
#> 1980-12-06 0.042
#> 1980-12-07 0.083
#> 1980-12-08 0.083
#> 1980-12-09 0.125
#> 1980-12-10 0.042
#> 1980-12-11 0.208
#> 1980-12-12 0.125
#> 1980-12-13 0.125
#> 1980-12-14 0.208
#> 1980-12-15 0.125
#> 1980-12-16 0.250
#> 1980-12-17 0.042
#> 1980-12-18 0.167
#> 1980-12-19 0.125
#> 1980-12-20 0.083
#> 1980-12-21 0.000
#> 1980-12-22 0.292
#> 1980-12-23 0.208
#> 1980-12-24 0.000
#> 1980-12-25 0.083
#> 1980-12-26 0.167
#> 1980-12-27 0.208
#> 1980-12-28 0.167
#> 1980-12-29 0.083
#> 1980-12-30 0.083
#> 1980-12-31 0.000
#> 1981-01-01 0.125
#> 1981-01-02 0.208
#> 1981-01-03 0.000
#> 1981-01-04 0.042
#> 1981-01-05 0.083
#> 1981-01-06 0.083
#> 1981-01-07 0.167
#> 1981-01-08 0.125
#> 1981-01-09 0.167
#> 1981-01-10 0.125
#> 1981-01-11 0.125
#> 1981-01-12 0.167
#> 1981-01-13 0.042
#> 1981-01-14 0.250
#> 1981-01-15 0.125
#> 1981-01-16 0.083
#> 1981-01-17 0.083
#> 1981-01-18 0.208
#> 1981-01-19 0.042
#> 1981-01-20 0.125
#> 1981-01-21 0.125
#> 1981-01-22 0.042
#> 1981-01-23 0.167
#> 1981-01-24 0.042
#> 1981-01-25 0.125
#> 1981-01-26 0.208
#> 1981-01-27 0.167
#> 1981-01-28 0.083
#> 1981-01-29 0.083
#> 1981-01-30 0.167
#> 1981-01-31 0.333
#> 1981-02-01 0.125
#> 1981-02-02 0.083
#> 1981-02-03 0.042
#> 1981-02-04 0.083
#> 1981-02-05 0.125
#> 1981-02-06 0.042
#> 1981-02-07 0.083
#> 1981-02-08 0.125
#> 1981-02-09 0.167
#> 1981-02-10 0.000
#> 1981-02-11 0.125
#> 1981-02-12 0.167
#> 1981-02-13 0.083
#> 1981-02-14 0.167
#> 1981-02-15 0.083
#> 1981-02-16 0.083
#> 1981-02-17 0.042
#> 1981-02-18 0.125
#> 1981-02-19 0.083
#> 1981-02-20 0.125
#> 1981-02-21 0.083
#> 1981-02-22 0.042
#> 1981-02-23 0.125
#> 1981-02-24 0.125
#> 1981-02-25 0.167
#> 1981-02-26 0.083
#> 1981-02-27 0.125
#> 1981-02-28 0.083
#> 1981-03-01 0.042
#> 1981-03-02 0.125
#> 1981-03-03 0.167
#> 1981-03-04 0.042
#> 1981-03-05 0.083
#> 1981-03-06 0.125
#> 1981-03-07 0.042
#> 1981-03-08 0.167
#> 1981-03-09 0.000
#> 1981-03-10 0.208
#> 1981-03-11 0.083
#> 1981-03-12 0.042
#> 1981-03-13 0.083
#> 1981-03-14 0.083
#> 1981-03-15 0.125
#> 1981-03-16 0.167
#> 1981-03-17 0.125
#> 1981-03-18 0.250
#> 1981-03-19 0.083
#> 1981-03-20 0.125
#> 1981-03-21 0.167
#> 1981-03-22 0.208
#> 1981-03-23 0.000
#> 1981-03-24 0.208
#> 1981-03-25 0.208
#> 1981-03-26 0.125
#> 1981-03-27 0.083
#> 1981-03-28 0.083
#> 1981-03-29 0.208
#> 1981-03-30 0.042
#> 1981-03-31 0.042
#> 1981-04-01 0.083
#> 1981-04-02 0.000
#> 1981-04-03 0.083
#> 1981-04-04 0.250
#> 1981-04-05 0.083
#> 1981-04-06 0.042
#> 1981-04-07 0.125
#> 1981-04-08 0.083
#> 1981-04-09 0.208
#> 1981-04-10 0.167
#> 1981-04-11 0.000
#> 1981-04-12 0.167
#> 1981-04-13 0.083
#> 1981-04-14 0.125
#> 1981-04-15 0.125
#> 1981-04-16 0.083
#> 1981-04-17 0.125
#> 1981-04-18 0.000
#> 1981-04-19 0.083
#> 1981-04-20 0.042
#> 1981-04-21 0.083
#> 1981-04-22 0.083
#> 1981-04-23 0.042
#> 1981-04-24 0.167
#> 1981-04-25 0.167
#> 1981-04-26 0.208
#> 1981-04-27 0.167
#> 1981-04-28 0.083
#> 1981-04-29 0.042
#> 1981-04-30 0.250
#> 1981-05-01 0.125
#> 1981-05-02 0.083
#> 1981-05-03 0.125
#> 1981-05-04 0.167
#> 1981-05-05 0.083
#> 1981-05-06 0.083
#> 1981-05-07 0.000
#> 1981-05-08 0.208
#> 1981-05-09 0.042
#> 1981-05-10 0.167
#> 1981-05-11 0.042
#> 1981-05-12 0.083
#> 1981-05-13 0.000
#> 1981-05-14 0.083
#> 1981-05-15 0.125
#> 1981-05-16 0.042
#> 1981-05-17 0.000
#> 1981-05-18 0.083
#> 1981-05-19 0.083
#> 1981-05-20 0.042
#> 1981-05-21 0.208
#> 1981-05-22 0.000
#> 1981-05-23 0.083
#> 1981-05-24 0.208
#> 1981-05-25 0.000
#> 1981-05-26 0.125
#> 1981-05-27 0.083
#> 1981-05-28 0.125
#> 1981-05-29 0.000
#> 1981-05-30 0.000
#> 1981-05-31 0.042
#> 1981-06-01 0.042
#> 1981-06-02 0.167
#> 1981-06-03 0.125
#> 1981-06-04 0.208
#> 1981-06-05 0.042
#> 1981-06-06 0.042
#> 1981-06-07 0.083
#> 1981-06-08 0.042
#> 1981-06-09 0.125
#> 1981-06-10 0.042
#> 1981-06-11 0.083
#> 1981-06-12 0.042
#> 1981-06-13 0.167
#> 1981-06-14 0.125
#> 1981-06-15 0.125
#> 1981-06-16 0.125
#> 1981-06-17 0.083
#> 1981-06-18 0.042
#> 1981-06-19 0.042
#> 1981-06-20 0.083
#> 1981-06-21 0.042
#> 1981-06-22 0.083
#> 1981-06-23 0.083
#> 1981-06-24 0.125
#> 1981-06-25 0.125
#> 1981-06-26 0.042
#> 1981-06-27 0.250
#> 1981-06-28 0.042
#> 1981-06-29 0.125
#> 1981-06-30 0.042
#> 1981-07-01 0.125
#> 1981-07-02 0.208
#> 1981-07-03 0.167
#> 1981-07-04 0.083
#> 1981-07-05 0.042
#> 1981-07-06 0.167
#> 1981-07-07 0.042
#> 1981-07-08 0.125
#> 1981-07-09 0.208
#> 1981-07-10 0.042
#> 1981-07-11 0.125
#> 1981-07-12 0.125
#> 1981-07-13 0.125
#> 1981-07-14 0.208
#> 1981-07-15 0.083
#> 1981-07-16 0.167
#> 1981-07-17 0.042
#> 1981-07-18 0.125
#> 1981-07-19 0.125
#> 1981-07-20 0.083
#> 1981-07-21 0.042
#> 1981-07-22 0.125
#> 1981-07-23 0.292
#> 1981-07-24 0.250
#> 1981-07-25 0.042
#> 1981-07-26 0.042
#> 1981-07-27 0.125
#> 1981-07-28 0.125
#> 1981-07-29 0.083
#> 1981-07-30 0.083
#> 1981-07-31 0.042
#> 1981-08-01 0.208
#> 1981-08-02 0.125
#> 1981-08-03 0.125
#> 1981-08-04 0.250
#> 1981-08-05 0.167
#> 1981-08-06 0.042
#> 1981-08-07 0.083
#> 1981-08-08 0.125
#> 1981-08-09 0.042
#> 1981-08-10 0.042
#> 1981-08-11 0.125
#> 1981-08-12 0.083
#> 1981-08-13 0.042
#> 1981-08-14 0.042
#> 1981-08-15 0.125
#> 1981-08-16 0.042
#> 1981-08-17 0.083
#> 1981-08-18 0.083
#> 1981-08-19 0.125
#> 1981-08-20 0.000
#> 1981-08-21 0.125
#> 1981-08-22 0.208
#> 1981-08-23 0.208
#> 1981-08-24 0.208
#> 1981-08-25 0.125
#> 1981-08-26 0.125
#> 1981-08-27 0.042
#> 1981-08-28 0.083
#> 1981-08-29 0.083
#> 1981-08-30 0.083
#> 1981-08-31 0.000
#> 1981-09-01 0.125
#> 1981-09-02 0.083
#> 1981-09-03 0.083
#> 1981-09-04 0.042
#> 1981-09-05 0.083
#> 1981-09-06 0.208
#> 1981-09-07 0.083
#> 1981-09-08 0.208
#> 1981-09-09 0.208
#> 1981-09-10 0.125
#> 1981-09-11 0.083
#> 1981-09-12 0.042
#> 1981-09-13 0.125
#> 1981-09-14 0.125
#> 1981-09-15 0.208
#> 1981-09-16 0.167
#> 1981-09-17 0.042
#> 1981-09-18 0.000
#> 1981-09-19 0.042
#> 1981-09-20 0.125
#> 1981-09-21 0.083
#> 1981-09-22 0.042
#> 1981-09-23 0.125
#> 1981-09-24 0.125
#> 1981-09-25 0.083
#> 1981-09-26 0.130
#> 1981-09-27 0.167
#> 1981-09-28 0.042
#> 1981-09-29 0.083
#> 1981-09-30 0.125
#> 1981-10-01 0.042
#> 1981-10-02 0.125
#> 1981-10-03 0.042
#> 1981-10-04 0.042
#> 1981-10-05 0.042
#> 1981-10-06 0.083
#> 1981-10-07 0.167
#> 1981-10-08 0.083
#> 1981-10-09 0.292
#> 1981-10-10 0.000
#> 1981-10-11 0.130
#> 1981-10-12 0.167
#> 1981-10-13 0.042
#> 1981-10-14 0.000
#> 1981-10-15 0.167
#> 1981-10-16 0.167
#> 1981-10-17 0.167
#> 1981-10-18 0.083
#> 1981-10-19 0.125
#> 1981-10-20 0.042
#> 1981-10-21 0.083
#> 1981-10-22 0.125
#> 1981-10-23 0.083
#> 1981-10-24 0.208
#> 1981-10-25 0.083
#> 1981-10-26 0.125
#> 1981-10-27 0.208
#> 1981-10-28 0.000
#> 1981-10-29 0.083
#> 1981-10-30 0.042
#> 1981-10-31 0.000
#> 1981-11-01 0.042
#> 1981-11-02 0.167
#> 1981-11-03 0.083
#> 1981-11-04 0.083
#> 1981-11-05 0.125
#> 1981-11-06 0.042
#> 1981-11-07 0.125
#> 1981-11-08 0.083
#> 1981-11-09 0.042
#> 1981-11-10 0.167
#> 1981-11-11 0.042
#> 1981-11-12 0.083
#> 1981-11-13 0.042
#> 1981-11-14 0.083
#> 1981-11-15 0.167
#> 1981-11-16 0.000
#> 1981-11-17 0.042
#> 1981-11-18 0.000
#> 1981-11-19 0.042
#> 1981-11-20 0.167
#> 1981-11-21 0.167
#> 1981-11-22 0.125
#> 1981-11-23 0.125
#> 1981-11-24 0.208
#> 1981-11-25 0.167
#> 1981-11-26 0.083
#> 1981-11-27 0.042
#> 1981-11-28 0.042
#> 1981-11-29 0.083
#> 1981-11-30 0.083
#> 1981-12-01 0.000
#> 1981-12-02 0.167
#> 1981-12-03 0.125
#> 1981-12-04 0.083
#> 1981-12-05 0.167
#> 1981-12-06 0.125
#> 1981-12-07 0.125
#> 1981-12-08 0.167
#> 1981-12-09 0.125
#> 1981-12-10 0.083
#> 1981-12-11 0.208
#> 1981-12-12 0.000
#> 1981-12-13 0.167
#> 1981-12-14 0.250
#> 1981-12-15 0.000
#> 1981-12-16 0.083
#> 1981-12-17 0.125
#> 1981-12-18 0.125
#> 1981-12-19 0.042
#> 1981-12-20 0.083
#> 1981-12-21 0.208
#> 1981-12-22 0.125
#> 1981-12-23 0.167
#> 1981-12-24 0.042
#> 1981-12-25 0.125
#> 1981-12-26 0.125
#> 1981-12-27 0.000
#> 1981-12-28 0.125
#> 1981-12-29 0.000
#> 1981-12-30 0.000
#> 1981-12-31 0.125
#> 1982-01-01 0.125
#> 1982-01-02 0.125
#> 1982-01-03 0.042
#> 1982-01-04 0.208
#> 1982-01-05 0.083
#> 1982-01-06 0.167
#> 1982-01-07 0.125
#> 1982-01-08 0.292
#> 1982-01-09 0.125
#> 1982-01-10 0.042
#> 1982-01-11 0.125
#> 1982-01-12 0.083
#> 1982-01-13 0.083
#> 1982-01-14 0.125
#> 1982-01-15 0.167
#> 1982-01-16 0.042
#> 1982-01-17 0.000
#> 1982-01-18 0.042
#> 1982-01-19 0.125
#> 1982-01-20 0.208
#> 1982-01-21 0.000
#> 1982-01-22 0.000
#> 1982-01-23 0.125
#> 1982-01-24 0.083
#> 1982-01-25 0.083
#> 1982-01-26 0.042
#> 1982-01-27 0.125
#> 1982-01-28 0.125
#> 1982-01-29 0.167
#> 1982-01-30 0.042
#> 1982-01-31 0.042
#> 1982-02-01 0.125
#> 1982-02-02 0.208
#> 1982-02-03 0.000
#> 1982-02-04 0.083
#> 1982-02-05 0.083
#> 1982-02-06 0.167
#> 1982-02-07 0.125
#> 1982-02-08 0.167
#> 1982-02-09 0.167
#> 1982-02-10 0.125
#> 1982-02-11 0.208
#> 1982-02-12 0.083
#> 1982-02-13 0.042
#> 1982-02-14 0.083
#> 1982-02-15 0.167
#> 1982-02-16 0.083
#> 1982-02-17 0.000
#> 1982-02-18 0.125
#> 1982-02-19 0.208
#> 1982-02-20 0.042
#> 1982-02-21 0.167
#> 1982-02-22 0.042
#> 1982-02-23 0.042
#> 1982-02-24 0.083
#> 1982-02-25 0.083
#> 1982-02-26 0.042
#> 1982-02-27 0.083
#> 1982-02-28 0.125
#> 1982-03-01 0.042
#> 1982-03-02 0.000
#> 1982-03-03 0.000
#> 1982-03-04 0.083
#> 1982-03-05 0.083
#> 1982-03-06 0.167
#> 1982-03-07 0.083
#> 1982-03-08 0.167
#> 1982-03-09 0.042
#> 1982-03-10 0.125
#> 1982-03-11 0.042
#> 1982-03-12 0.125
#> 1982-03-13 0.125
#> 1982-03-14 0.208
#> 1982-03-15 0.125
#> 1982-03-16 0.167
#> 1982-03-17 0.250
#> 1982-03-18 0.125
#> 1982-03-19 0.208
#> 1982-03-20 0.042
#> 1982-03-21 0.042
#> 1982-03-22 0.167
#> 1982-03-23 0.042
#> 1982-03-24 0.000
#> 1982-03-25 0.083
#> 1982-03-26 0.083
#> 1982-03-27 0.083
#> 1982-03-28 0.125
#> 1982-03-29 0.083
#> 1982-03-30 0.125
#> 1982-03-31 0.000
#> 1982-04-01 0.167
#> 1982-04-02 0.167
#> 1982-04-03 0.083
#> 1982-04-04 0.167
#> 1982-04-05 0.083
#> 1982-04-06 0.083
#> 1982-04-07 0.167
#> 1982-04-08 0.125
#> 1982-04-09 0.083
#> 1982-04-10 0.125
#> 1982-04-11 0.083
#> 1982-04-12 0.125
#> 1982-04-13 0.208
#> 1982-04-14 0.125
#> 1982-04-15 0.042
#> 1982-04-16 0.167
#> 1982-04-17 0.125
#> 1982-04-18 0.167
#> 1982-04-19 0.083
#> 1982-04-20 0.083
#> 1982-04-21 0.042
#> 1982-04-22 0.000
#> 1982-04-23 0.083
#> 1982-04-24 0.167
#> 1982-04-25 0.125
#> 1982-04-26 0.125
#> 1982-04-27 0.083
#> 1982-04-28 0.125
#> 1982-04-29 0.125
#> 1982-04-30 0.083
#> 1982-05-01 0.000
#> 1982-05-02 0.125
#> 1982-05-03 0.167
#> 1982-05-04 0.167
#> 1982-05-05 0.083
#> 1982-05-06 0.042
#> 1982-05-07 0.208
#> 1982-05-08 0.083
#> 1982-05-09 0.000
#> 1982-05-10 0.167
#> 1982-05-11 0.167
#> 1982-05-12 0.125
#> 1982-05-13 0.125
#> 1982-05-14 0.042
#> 1982-05-15 0.167
#> 1982-05-16 0.125
#> 1982-05-17 0.167
#> 1982-05-18 0.167
#> 1982-05-19 0.083
#> 1982-05-20 0.208
#> 1982-05-21 0.167
#> 1982-05-22 0.125
#> 1982-05-23 0.125
#> 1982-05-24 0.083
#> 1982-05-25 0.083
#> 1982-05-26 0.083
#> 1982-05-27 0.000
#> 1982-05-28 0.000
#> 1982-05-29 0.000
#> 1982-05-30 0.042
#> 1982-05-31 0.083
#> 1982-06-01 0.042
#> 1982-06-02 0.042
#> 1982-06-03 0.125
#> 1982-06-04 0.042
#> 1982-06-05 0.083
#> 1982-06-06 0.125
#> 1982-06-07 0.125
#> 1982-06-08 0.000
#> 1982-06-09 0.000
#> 1982-06-10 0.167
#> 1982-06-11 0.208
#> 1982-06-12 0.125
#> 1982-06-13 0.042
#> 1982-06-14 0.083
#> 1982-06-15 0.083
#> 1982-06-16 0.167
#> 1982-06-17 0.042
#> 1982-06-18 0.167
#> 1982-06-19 0.292
#> 1982-06-20 0.083
#> 1982-06-21 0.042
#> 1982-06-22 0.083
#> 1982-06-23 0.042
#> 1982-06-24 0.083
#> 1982-06-25 0.125
#> 1982-06-26 0.042
#> 1982-06-27 0.125
#> 1982-06-28 0.042
#> 1982-06-29 0.083
#> 1982-06-30 0.042
#> 1982-07-01 0.042
#> 1982-07-02 0.125
#> 1982-07-03 0.000
#> 1982-07-04 0.083
#> 1982-07-05 0.125
#> 1982-07-06 0.042
#> 1982-07-07 0.000
#> 1982-07-08 0.042
#> 1982-07-09 0.167
#> 1982-07-10 0.042
#> 1982-07-11 0.000
#> 1982-07-12 0.125
#> 1982-07-13 0.208
#> 1982-07-14 0.042
#> 1982-07-15 0.167
#> 1982-07-16 0.042
#> 1982-07-17 0.042
#> 1982-07-18 0.083
#> 1982-07-19 0.000
#> 1982-07-20 0.083
#> 1982-07-21 0.083
#> 1982-07-22 0.083
#> 1982-07-23 0.042
#> 1982-07-24 0.167
#> 1982-07-25 0.083
#> 1982-07-26 0.125
#> 1982-07-27 0.083
#> 1982-07-28 0.250
#> 1982-07-29 0.083
#> 1982-07-30 0.125
#> 1982-07-31 0.292
#> 1982-08-01 0.167
#> 1982-08-02 0.208
#> 1982-08-03 0.250
#> 1982-08-04 0.167
#> 1982-08-05 0.000
#> 1982-08-06 0.208
#> 1982-08-07 0.125
#> 1982-08-08 0.083
#> 1982-08-09 0.042
#> 1982-08-10 0.042
#> 1982-08-11 0.125
#> 1982-08-12 0.125
#> 1982-08-13 0.042
#> 1982-08-14 0.083
#> 1982-08-15 0.292
#> 1982-08-16 0.125
#> 1982-08-17 0.042
#> 1982-08-18 0.042
#> 1982-08-19 0.000
#> 1982-08-20 0.167
#> 1982-08-21 0.125
#> 1982-08-22 0.125
#> 1982-08-23 0.125
#> 1982-08-24 0.083
#> 1982-08-25 0.083
#> 1982-08-26 0.042
#> 1982-08-27 0.125
#> 1982-08-28 0.083
#> 1982-08-29 0.042
#> 1982-08-30 0.167
#> 1982-08-31 0.000
#> 1982-09-01 0.083
#> 1982-09-02 0.167
#> 1982-09-03 0.125
#> 1982-09-04 0.083
#> 1982-09-05 0.042
#> 1982-09-06 0.000
#> 1982-09-07 0.000
#> 1982-09-08 0.167
#> 1982-09-09 0.125
#> 1982-09-10 0.083
#> 1982-09-11 0.042
#> 1982-09-12 0.167
#> 1982-09-13 0.083
#> 1982-09-14 0.000
#> 1982-09-15 0.083
#> 1982-09-16 0.125
#> 1982-09-17 0.083
#> 1982-09-18 0.042
#> 1982-09-19 0.042
#> 1982-09-20 0.125
#> 1982-09-21 0.167
#> 1982-09-22 0.083
#> 1982-09-23 0.125
#> 1982-09-24 0.083
#> 1982-09-25 0.087
#> 1982-09-26 0.167
#> 1982-09-27 0.125
#> 1982-09-28 0.042
#> 1982-09-29 0.083
#> 1982-09-30 0.208
#> 1982-10-01 0.125
#> 1982-10-02 0.083
#> 1982-10-03 0.125
#> 1982-10-04 0.125
#> 1982-10-05 0.125
#> 1982-10-06 0.042
#> 1982-10-07 0.042
#> 1982-10-08 0.042
#> 1982-10-09 0.125
#> 1982-10-10 0.087
#> 1982-10-11 0.125
#> 1982-10-12 0.042
#> 1982-10-13 0.083
#> 1982-10-14 0.083
#> 1982-10-15 0.125
#> 1982-10-16 0.042
#> 1982-10-17 0.042
#> 1982-10-18 0.083
#> 1982-10-19 0.000
#> 1982-10-20 0.083
#> 1982-10-21 0.083
#> 1982-10-22 0.125
#> 1982-10-23 0.083
#> 1982-10-24 0.000
#> 1982-10-25 0.167
#> 1982-10-26 0.042
#> 1982-10-27 0.083
#> 1982-10-28 0.083
#> 1982-10-29 0.083
#> 1982-10-30 0.042
#> 1982-10-31 0.167
#> 1982-11-01 0.083
#> 1982-11-02 0.042
#> 1982-11-03 0.042
#> 1982-11-04 0.083
#> 1982-11-05 0.167
#> 1982-11-06 0.292
#> 1982-11-07 0.167
#> 1982-11-08 0.042
#> 1982-11-09 0.125
#> 1982-11-10 0.042
#> 1982-11-11 0.125
#> 1982-11-12 0.042
#> 1982-11-13 0.042
#> 1982-11-14 0.042
#> 1982-11-15 0.042
#> 1982-11-16 0.125
#> 1982-11-17 0.083
#> 1982-11-18 0.083
#> 1982-11-19 0.208
#> 1982-11-20 0.125
#> 1982-11-21 0.083
#> 1982-11-22 0.208
#> 1982-11-23 0.000
#> 1982-11-24 0.000
#> 1982-11-25 0.167
#> 1982-11-26 0.042
#> 1982-11-27 0.042
#> 1982-11-28 0.208
#> 1982-11-29 0.000
#> 1982-11-30 0.000
#> 1982-12-01 0.167
#> 1982-12-02 0.208
#> 1982-12-03 0.000
#> 1982-12-04 0.167
#> 1982-12-05 0.125
#> 1982-12-06 0.000
#> 1982-12-07 0.042
#> 1982-12-08 0.042
#> 1982-12-09 0.208
#> 1982-12-10 0.042
#> 1982-12-11 0.208
#> 1982-12-12 0.083
#> 1982-12-13 0.083
#> 1982-12-14 0.000
#> 1982-12-15 0.083
#> 1982-12-16 0.125
#> 1982-12-17 0.000
#> 1982-12-18 0.000
#> 1982-12-19 0.167
#> 1982-12-20 0.167
#> 1982-12-21 0.083
#> 1982-12-22 0.125
#> 1982-12-23 0.083
#> 1982-12-24 0.000
#> 1982-12-25 0.167
#> 1982-12-26 0.042
#> 1982-12-27 0.167
#> 1982-12-28 0.042
#> 1982-12-29 0.125
#> 1982-12-30 0.125
#> 1982-12-31 0.083
# Getting the amount of NAs in 'x' for each weather season
cmv(x, tscale="seasonal")
#>
#> 1979-DJF 0.250
#> 1980-DJF 0.098
#> 1980-JJA 0.098
#> 1980-MAM 0.095
#> 1980-SON 0.099
#> 1981-DJF 0.111
#> 1981-JJA 0.106
#> 1981-MAM 0.101
#> 1981-SON 0.099
#> 1982-DJF 0.101
#> 1982-JJA 0.097
#> 1982-MAM 0.105
#> 1982-SON 0.090