View source: R/fill_initialgap_MOD13Q1.R
fill_initialgap_MOD13Q1 | R Documentation |
Since MOD13Q1 was released on 18-02-2000 and its temporal resolution is 16 days, there are no measurements available for the first three acquisition dates of 2000. This function allows to fill these three dates using historic data.
fill_initialgap_MOD13Q1(m, fun = stats::median)
m |
matrix with |
fun |
a function employed to impute missing values. Default, |
The missing values of m
are m[1,1]
, m[1,2]
and m[1,3]
. For instance,
to fill m[1,1]
the values of m[2:nrow(m),1]
are used, and consequently, it
is expected that the larger the numeric vector, the smaller the variability of the imputed
value for m[1,1]
.
A numeric vector of length 3
It is recommended to use vecToMatrix
to transfer
the values of a numeric vector of MOD13Q1 measurements into a matrix.
vecToMatrix
, vecFromData
data("deciduous_polygon")
str(deciduous_polygon, vec.len = 1)
x <- deciduous_polygon[1,] # check x[1:3]
x_asMatrix <- vecToMatrix(x, lenPeriod = 23) # check str(x_asMatrix)
x_asMat_complete <- fill_initialgap_MOD13Q1(m=x_asMatrix)
#filled first three values of x
x[1:3] <- x_asMat_complete
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.