Description Usage Arguments Value Author(s) References See Also Examples
This function conducts an Empirical Orthogonal Function analysis (EOF) via a covariance matrix (cov4gappy function) using "sinkr" package especially designed to handle gappy raster time series
| 1 2 3 | 
| rasterts | Input raster time series as  | 
| rastermask | Either a  | 
| nu | Numeric. Defines the number of EOFs to return. Defaults to return the full set of EOFs. | 
| gapfill | Character. Defines the algorithm to be used to interpolate pixels with incomplete temporal profiles. Accepts argument supported as method in function  | 
| centered | Logical. If TRUE center the input data before EOF computation. Argument is passed through to function  | 
| scaled | Logical. If TRUE scale the input data before EOF computation. Argument is passed through to function  | 
| cores | Integer. Defines the number of CPU to be used for multicore processing. Default to "1" core for singlecore processing. Applies only to the masking step. | 
| ... | Additional arguments to be passed through to function  | 
Object of class EOFstack containing the following components:
| eof.modes | EOF modes as RasterBrickobject | |
| expansion_coefficients | EOF Expansion Coefficients (EC) as xtsobject | |
| total_variance | Numeric. Total variance of input raster time series | |
| explained_variance | Numeric vector. Percentage of variance explained by each EOF mode with respect to the total variance of input raster time series | |
| center | Center values from each pixel temporal profile as RasterLayerobject (only computed ifcentered = TRUE) | |
| scale | Scale values from each pixel temporal profile as RasterLayerobject (only computed ifscaled = TRUE) | 
Federico Filipponi
Bjoernsson, H. and Venegas, S.A. (1997). "A manual for EOF and SVD analyses of climate data", McGill University, CCGCR Report No. 97-1, Montreal, Quebec, 52pp.
Marc, T.H., Losch, M., Wenzel, M., Schroeter, J. (2013). On the Sensitivity of Field Reconstruction and Prediction Using Empirical Orthogonal Functions Derived from Gappy Data. Journal of Climate, 26, 9194-9205. pdf
eof, rtsa.scaleEOF, rtsa.gapfill
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run: 
## create raster time series using the 'pacificSST' data from 'remote' package
require(remote)
data(pacificSST)
pacificSST[which(getValues(pacificSST == 0))] <- NA # set NA values
# create rts object
rasterts <- rts(pacificSST, seq(as.Date('1982-01-15'), as.Date('2010-12-15'), 'months'))
## generate raster mask
raster_mask <- pacificSST[[1]] # create raster mask
names(raster_mask) <- "mask"
values(raster_mask) <- 1 # set raster mask values
raster_mask[which(is.na(getValues(pacificSST[[1]])))] <- 0 # set raster mask values
## compute EOF
# compute the first 10 EOFs
eof_result <- rtsa.eof(rasterts=rasterts, nu=10)
# recursively compute the first 10 EOFs using raster mask
eof_result_recursive <- rtsa.eof(rasterts=rasterts, rastermask=raster_mask, nu=10, recursive=T)
# compute the first 10 EOFs applying centering, scaling 
# and raster mask computing before eof computation
eof_res_masked <- rtsa.eof(rasterts=rasterts, rastermask="compute", nu=10, centered=T, scaled=T)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.