| Title: | Empirical Orthogonal Teleconnections in R |
| Version: | 1.3.0 |
| Maintainer: | Tim Appelhans <tappelhans@tutamail.com> |
| Description: | Empirical orthogonal teleconnections in R. 'remote' is short for 'R(-based) EMpirical Orthogonal TEleconnections'. It implements a collection of functions to facilitate empirical orthogonal teleconnection analysis. Empirical Orthogonal Teleconnections (EOTs) denote a regression based approach to decompose spatio-temporal fields into a set of independent orthogonal patterns. They are quite similar to Empirical Orthogonal Functions (EOFs) with EOTs producing less abstract results. In contrast to EOFs, which are orthogonal in both space and time, EOT analysis produces patterns that are orthogonal in either space or time. |
| License: | GPL (≥ 3) | file LICENSE |
| Depends: | Rcpp (≥ 0.10.3), methods, R (≥ 3.5) |
| Imports: | grDevices, stats, terra, utils |
| Suggests: | checkmate, maps, raster, tinytest |
| LinkingTo: | Rcpp |
| Encoding: | UTF-8 |
| Config/roxygen2/version: | 8.1.1 |
| LazyData: | true |
| NeedsCompilation: | yes |
| Packaged: | 2026-11-30 09:09:44 UTC; tim |
| Author: | Tim Appelhans [cre, aut], Florian Detsch [aut], Thomas Nauss [ctb] |
| Repository: | CRAN |
| Date/Publication: | 2026-11-30 15:00:02 UTC |
R EMpirical Orthogonal TEleconnections
Description
A collection of functions to facilitate empirical orthogonal teleconnection analysis. Some handy functions for preprocessing, such as deseasoning, denoising, lagging are readily available for ease of usage.
Details
R EMpirical Orthogonal TEleconnections
Author(s)
Tim Appelhans, Florian Detsch, Thomas Nauss
Maintainer: Tim Appelhans tappelhans@tutamail.com
References
Empirical Orthogonal Teleconnections
H. M. van den Dool, S. Saha, A. Johansson (2000)
Journal of Climate, Volume 13, Issue 8 (April 2000) pp. 1421 - 1435
Empirical methods in short-term climate prediction
H. M. van den Dool (2007)
Oxford University Press, Oxford, New York (2007)
See Also
remote is built upon the terra package, which is the direct successor of the raster package. The terra package is used for raster data handling and processing, while raster is still supported but not actively developed anymore. For more information on raster data handling, please refer to the documentation of the terra package and its functions.
Calculate a single EOT
Description
Calculates a single EOT and is controlled by the main eot() function.
Usage
EotCycle(
x,
y,
n = 1,
standardised,
orig.var,
write.out,
path.out,
prefix,
type = c("rsq", "ioa"),
verbose,
...
)
Arguments
x, y, n, standardised, write.out, path.out, prefix, type, verbose |
See |
orig.var |
original variance of the response domain |
... |
Further arguments passed to |
Class EotMode
Description
Class EotMode
Slots
modethe number of the identified mode
namethe name of the mode
eotthe EOT (time series) at the identified base point. Note, this is a simple numeric vector
coords_bpthe coordinates of the identified base point
cell_bpthe cell number of the indeified base point
cum_exp_varthe cumulative explained variance of the considered EOT mode
r_predictorSpatRasterof the correlation coefficients between the base point and each pixel of the predictor domainrsq_predictoras above but for the coefficient of determination of the predictor domain
rsq_sums_predictoras above but for the sums of coefficient of determination of the predictor domain
int_predictorSpatRasterof the intercept of the regression equation for each pixel of the predictor domainslp_predictoras above but for the slope of the regression equation for each pixel of the predictor domain
p_predictorSpatRasterof the significance (p-value) of the regression equation for each pixel of the predictor domainresid_predictorSpatRasterof the reduced data for the predictor domainr_responseSpatRasterof the correlation coefficients between the base point and each pixel of the response domainrsq_responseas above but for the coefficient of determination of the response domain
int_responseSpatRasterof the intercept of the regression equation for each pixel of the response domainslp_responseas above but for the slope of the regression equation for each pixel of the response domain
p_responseSpatRasterof the significance (p-value) of the regression equation for each pixel of the response domainresid_responseSpatRasterof the reduced data for the response domain
Class EotStack
Description
Class EotStack
Slots
modesa list containing the individual 'EotMode's of the 'EotStack'
namesthe names of the modes
Create an anomaly raster series
Description
The function creates an anomaly raster series either based on
the overall mean of the original series, or a supplied reference raster.
For the creation of seasonal anomalies use deseason().
Usage
anomalize(x, reference = NULL, ...)
Arguments
x |
A |
reference |
An optional single-layer |
... |
If |
Value
An anomaly SpatRaster series.
See Also
Examples
pcp = terra::unwrap(australiaGPCP)
pcp_anom = anomalize(pcp)
opar = par(mfrow = c(1,2))
plot(pcp[[10]], main = "original")
plot(pcp_anom[[10]], main = "anomalized")
par(opar)
Monthly GPCP precipitation data for Australia
Description
Monthly Gridded Precipitation Climatology Project precipitation data for Australia from 1982/01 to 2010/12
Usage
australiaGPCP
Format
A PackedSpatRaster with the following attributes:
size : 12, 20, 348 (nrow, ncol, nlyr) resolution : 2.5, 2.5 (x, y) extent : 110, 160, -40, -10 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
Details
Monthly Gridded Precipitation Climatology Project precipitation data for Australia from 1982/01 to 2010/12
References
The Version-2 Global Precipitation Climatology Project (GPCP) Monthly Precipitation Analysis (1979 - Present)
Adler et al. (2003)
Journal of Hydrometeorology, Volume 4, Issue 6, pp. 1147 - 1167
doi:10.1175/1525-7541(2003)004<1147:TVGPCP>2.0.CO;2
Examples
terra::unwrap(australiaGPCP)
Calculate space-time variance of a raster series
Description
The function calculates the (optionally standardised) space-time variance of a raster series.
Usage
calcVar(x, standardised = FALSE, ...)
Arguments
x |
A |
standardised |
|
... |
Currently not used. |
Value
The mean (optionally standardised) space-time variance as numeric.
Examples
sst = terra::unwrap(pacificSST)
calcVar(sst) # default non-standardised
calcVar(sst, standardised = TRUE)
Create a weighted covariance matrix
Description
Create a weighted covariance matrix
Usage
covWeight(m, weights, ...)
Arguments
m |
A |
weights |
A |
... |
Additional arguments passed to |
Value
See stats::cov.wt().
Shorten a raster series
Description
The function cuts a specified number of layers off a raster series in order to create a lagged stack.
Usage
cutStack(x, tail = TRUE, n = NULL)
Arguments
x |
A |
tail |
|
n |
The number of layers to take away as |
Value
A SpatRaster series shortened by 'n' layers either from the
beginning or the end, depending on the specification of 'tail'.
Examples
pcp = terra::unwrap(australiaGPCP)
# 6 layers from the beginning
cutStack(pcp, tail = FALSE, n = 6)
# 8 layers from the end
cutStack(pcp, tail = TRUE, n = 8)
Convert degrees to radians
Description
Converts a series of degrees to radians.
Usage
deg2rad(deg)
Arguments
deg |
A series of degrees to be converted to radians. |
Value
A vector of radians.
Examples
## latitude in degrees
gph = terra::unwrap(vdendool)
degrees = terra::crds(gph)[, 2]
head(degrees)
## latitude in radians
radians = deg2rad(degrees)
head(radians)
## `SpatRaster` input, e.g. useful for topographic operations
tmp = gph[[1L]]
terra::values(tmp) = degrees
tmp_rad = deg2rad(tmp)
opar = par(mfrow = c(1, 2))
plot(tmp, main = "lat (degrees)")
plot(tmp_rad, main = "lat (radians)")
par(opar)
Noise filtering through principal components
Description
Filter noise from a raster series by decomposing into principal components and subsequent reconstruction using only a subset of components.
Usage
denoise(
x,
k = NULL,
expl.var = NULL,
weighted = TRUE,
use.cpp = TRUE,
verbose = TRUE,
...
)
Arguments
x |
A |
k |
The number of components to be kept for reconstruction (ignored if 'expl.var' is supplied). |
expl.var |
Minimum amount of variance to be kept after reconstruction
(should be set to |
weighted |
logical. If |
use.cpp |
logical. Determines whether to use Rcpp functionality,
defaults to |
verbose |
logical. If |
... |
Additional arguments passed to |
Value
A denoised SpatRaster series.
Note
Either 'k' or 'expl.var' must be specified. If both are supplied, 'k' will be ignored. If none are supplied, an error will be thrown.
See Also
Examples
gph = terra::unwrap(vdendool)
gph_dns = denoise(gph, expl.var = 0.8)
opar = par(mfrow = c(1,2))
plot(gph[[1]], main = "original")
plot(gph_dns[[1]], main = "denoised")
par(opar)
Create seasonal anomalies
Description
The function calculates anomalies of a raster object by
supplying a suitable seasonal window. E.g. to create monthly anomalies of a
raster stack of 12 layers per year, use cycle.window = 12.
Usage
## S4 method for signature 'SpatRaster'
deseason(x, cycle.window = 12L, use.cpp = FALSE, filename = "", ...)
## S4 method for signature 'numeric'
deseason(x, cycle.window = 12L)
Arguments
x |
A |
cycle.window |
|
use.cpp |
|
filename |
|
... |
Additional arguments passed to |
Value
If 'x' is a raster object, a deseasoned SpatRaster; else a
deseasoned numeric vector.
See Also
Examples
pcp = terra::unwrap(australiaGPCP)
pcp_dsn = deseason(pcp, cycle.window = 12)
opar = par(mfrow = c(1, 2))
plot(pcp[[1]], main = "original")
plot(pcp_dsn[[1]], main = "deseasoned")
par(opar)
EOT analysis of a predictor and (optionally) a response raster series
Description
Calculate a given number of EOT modes either internally or between raster series.
Usage
eot(
x,
y = NULL,
n = 1,
standardised = TRUE,
write.out = FALSE,
path.out = ".",
prefix = "remote",
reduce.both = FALSE,
type = c("rsq", "ioa"),
verbose = TRUE,
...
)
Arguments
x |
A |
y |
A |
n |
The number of EOT modes to calculate as |
standardised |
|
write.out |
|
path.out |
The file path for writing results if 'write.out' is |
prefix |
optional prefix to be used for naming of results if 'write.out'
is |
reduce.both |
|
type |
The type of the link function. Defaults to |
verbose |
|
... |
Currently not used. |
Details
For a detailed description of the EOT algorithm and the mathematics behind it, see the References section. In brief, the algorithm works as follows: First, the temporal profiles of each pixel xp of the predictor domain are regressed against the profiles of all pixels xr in the response domain. The calculated coefficients of determination are summed up and the pixel with the highest sum is identified as the 'base point' of the first/leading mode. The temporal profile at this base point is the first/leading EOT. Then, the residuals from the regression are taken to be the basis for the calculation of the next EOT, thus ensuring orthogonality of the identified teleconnections. This procedure is repeated until a predefined amount of n EOTs is calculated. In general, remote implements a 'brute force' spatial data mining approach to identify locations of enhanced potential to explain spatio-temporal variability within the same or another geographic field.
Value
If n = 1`` an EotMode, if n > 1 an EotStackof 'n'EotModes. Each EotMode' has the following components:
-
mode - the number of the identified mode (1 - n)
-
eot - the EOT (time series) at the identified base point. Note, this is a simple numeric vector, not of class
ts -
coords_bp - the coordinates of the identified base point
-
cell_bp - the cell number of the indeified base point
-
cum_exp_var - the (cumulative) explained variance of the considered EOT
-
r_predictor - the
SpatRasterof the correlation coefficients between the base point and each pixel of the predictor domain -
rsq_predictor - as above but for the coefficient of determination
-
rsq_sums_predictor - as above but for the sums of coefficient of determination
-
int_predictor - the
SpatRasterof the intercept of the regression equation for each pixel of the predictor domain -
slp_predictor - same as above but for the slope of the regression equation for each pixel of the predictor domain
-
p_predictor - the
SpatRasterof the significance (p-value) of the the regression equation for each pixel of the predictor domain -
resid_predictor - the
SpatRasterof the reduced data for the predictor domain
Apart from rsq_sums_predictor, all *_predictor fields are
also returned for the *_response domain,
even if predictor and response domain are equal. This is due to that fact,
that if not both fields are reduced after the first EOT is found,
these SpatRasters will differ.
References
Empirical Orthogonal Teleconnections
H. M. van den Dool, S. Saha, A. Johansson (2000)
Journal of Climate, Volume 13, Issue 8, pp. 1421-1435
doi:10.1175/1520-0442(2000)013<1421:EOT>2.0.CO;2
Empirical Methods in Short-Term Climate Prediction
H. M. van den Dool (2007)
Oxford University Press, Oxford, New York
doi:10.1093/oso/9780199202782.001.0001
Examples
### EXAMPLE I
### a single field
gph = terra::unwrap(vdendool)
## calculate 2 leading modes
nh_modes <- eot(x = gph, y = NULL, n = 2,
standardised = FALSE,
verbose = TRUE)
Geographic weighting
Description
The function performs geographic weighting of non-projected long/lat data. By default it uses the cosine of latitude (in radians) to compensate for the area distortion, though the user can supply other weighting functions.
Usage
geoWeight(x, f = cos, ...)
Arguments
x, f, ... |
See |
Value
A weighted SpatRaster.
Examples
gph <- terra::unwrap(vdendool)
wgtd <- geoWeight(gph)
opar <- par(mfrow = c(1,2))
plot(gph[[1]], main = "original")
plot(wgtd[[1]], main = "weighted")
par(opar)
Calculate weights from latitude
Description
Calculate weights using the cosine of latitude to compensate for area distortion of non-projected lat/lon data.
Usage
getWeights(x, f = cos, ...)
Arguments
x |
A non-projected |
f |
A |
... |
Additional arguments passed to 'f'. |
Value
A numeric vector of weights for non-NA cells in 'x'.
Examples
pcp = terra::unwrap(australiaGPCP)
wghts = getWeights(pcp)
utils::head(wghts)
wghts_rst = terra::setValues(pcp[[1]], wghts)
opar = par(mfrow = c(1,2))
plot(pcp[[1]], main = "data")
plot(wghts_rst, main = "weights")
par(opar)
Create lagged raster series
Description
The function is used to produce two lagged raster series. The second is cut from the beginning, the first from the tail to ensure equal output lengths (provided that input lengths were equal).
Usage
lagalize(x, y, lag = NULL, freq = 12L, ...)
Arguments
x |
A |
y |
A |
lag |
The desired lag in the native frequency of the series passed to
|
freq |
The frequency of the raster series as |
... |
Currently not used. |
Value
A list with the two raster series lagged by 'lag'.
Examples
sst = terra::unwrap(pacificSST)
pcp = terra::unwrap(australiaGPCP)
# lag GPCP by 4 months
lagged = lagalize(sst, pcp, lag = 4, freq = 12)
lagged[[1]][[1]] # check names to see date of layer
lagged[[2]][[1]] # -"-
Calculate long-term means from a raster series
Description
Calculate long-term means from an input raster series. Ideally, the number of
input layers should be divisable by the supplied 'cycle.window'. For
instance, if 'x' consists of monthly layers, 'cycle.window' should be a
multiple of 12.
Usage
longtermMeans(x, cycle.window = 12L)
Arguments
x |
A |
cycle.window |
|
Value
A SpatRaster with 'cycle.window' layers, each containing the mean across
all corresponding time steps.
Author(s)
Florian Detsch
See Also
Examples
pcp = terra::unwrap(australiaGPCP)
longtermMeans(pcp)
Number of EOTs needed for variance explanation
Description
The function identifies the number of modes needed to explain a certain amount of variance within the response field.
Usage
## S4 method for signature 'EotStack'
nXplain(x, var = 0.9)
Arguments
x |
An |
var |
The minimum amount of variance to be explained by the modes as
|
Value
The number of EOTs needed to explain 'var'.
Note
This is a post-hoc function. It needs an EotStack created as returned
by eot(). Depending on the potency of the identified EOTs, it may be
necessary to compute a high number of modes in order to be able to explain
a large enough part of the variance.
Examples
gph <- terra::unwrap(vdendool)
nh_modes <- eot(x = gph, y = NULL, n = 3,
standardised = FALSE,
verbose = TRUE)
### How many modes are needed to explain 25% of variance?
nXplain(nh_modes, 0.25)
Names of Eot* objects
Description
Get or set names of Eot* objects
Usage
## S4 method for signature 'EotStack'
names(x)
## S4 replacement method for signature 'EotStack'
names(x) <- value
## S4 method for signature 'EotMode'
names(x)
## S4 replacement method for signature 'EotMode'
names(x) <- value
Arguments
x |
a EotMode or EotStack |
value |
name to be assigned |
Value
if x is a EotStack, the names of all mdoes,
if x is a EotMode, the name the respective mode
Examples
gph <- terra::unwrap(vdendool)
nh_modes <- eot(gph, n = 2)
## mode names
names(nh_modes)
names(nh_modes) <- c("vdendool1", "vdendool2")
names(nh_modes)
names(nh_modes[[2]])
Number of modes of an EotStack
Description
Retrieves the number of modes of an EotStack.
Usage
nmodes(x)
Arguments
x |
An |
Value
The number of modes as integer.
Examples
gph = terra::unwrap(vdendool)
nh_modes = eot(gph, n = 2)
nmodes(nh_modes)
Monthly SSTs for the tropical Pacific Ocean
Description
Monthly NOAA sea surface temperatures for the tropical Pacific Ocean from 1982/01 to 2010/12
Usage
pacificSST
Format
A PackedSpatRaster with the following attributes:
size : 30, 140, 348 (nrow, ncol, nlyr) resolution : 1, 1 (x, y) extent : 150, 290, -15, 15 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
Details
Monthly NOAA sea surface temperatures for the tropical Pacific Ocean from 1982/01 to 2010/12
References
Daily High-Resolution-Blended Analyses for Sea Surface Temperature
Reynolds et al. (2007)
Journal of Climate, Volume 20, Issue 22, pp. 5473 - 5496
doi:10.1175/2007JCLI1824.1
Examples
terra::unwrap(pacificSST)
Plot an Eot* object
Description
This is the standard plotting routine for the results of eot().
Three panels will be drawn i) the predictor domain, ii) the response
domain, iii) the time series at the identified base point
Usage
## S4 method for signature 'EotMode,ANY'
plot(
x,
y,
pred.prm = "rsq",
resp.prm = "r",
show.bp = FALSE,
anomalies = TRUE,
add.map = TRUE,
ts.vec = NULL,
arrange = c("wide", "long"),
clr = NULL,
locations = FALSE,
...
)
## S4 method for signature 'EotStack,ANY'
plot(
x,
y,
pred.prm = "rsq",
resp.prm = "r",
show.bp = FALSE,
anomalies = TRUE,
add.map = TRUE,
ts.vec = NULL,
arrange = c("wide", "long"),
clr = NULL,
locations = FALSE,
...
)
Arguments
x |
either an object of EotMode or EotStack as returned by |
y |
integer or character of the mode to be plotted (e.g. 2 or "mode_2") |
pred.prm |
the parameter of the predictor to be plotted. |
resp.prm |
the parameter of the response to be plotted. |
show.bp |
logical. If |
anomalies |
logical. If |
add.map |
logical. If |
ts.vec |
an (optional) time series vector of the considered EOT calculation to be shown as the x-axis in the time series plot |
arrange |
whether the final plot should be arranged in "wide" or "long" format |
clr |
an (optional) color palette for displaying of the predictor and response fields |
locations |
logical. If x is an EotStack, set this to TRUE to produce a map showing the locations of all modes. Ignored if x is an EotMode |
... |
further arguments to be passed to |
Methods (by class)
-
plot(x = EotStack, y = ANY): EotStack
Examples
gph <- terra::unwrap(vdendool)
## calculate 2 leading modes
nh_modes <- eot(x = gph, y = NULL, n = 2,
standardised = FALSE,
verbose = TRUE)
## default settings
plot(nh_modes, y = 1) # is equivalent to
## Not run:
plot(nh_modes[[1]])
plot(nh_modes, y = 2) # shows variance explained by mode 2 only
plot(nh_modes[[2]]) # shows cumulative variance explained by modes 1 & 2
## showing the location of the mode but without map overlay
plot(nh_modes, y = 1, show.bp = TRUE, add.map = FALSE)
## changing parameters
plot(nh_modes, y = 1, show.bp = TRUE,
pred.prm = "r", resp.prm = "p")
## change plot arrangement
plot(nh_modes, y = 1, show.bp = TRUE, arrange = "long")
## plot locations of all base points
plot(nh_modes, locations = TRUE)
## End(Not run)
EOT based spatial prediction
Description
Make spatial predictions using the fitted model returned by
eot(). A (user-defined) set of 'n' modes will be used to
model the outcome using the identified link functions of the respective modes
which are added together to produce the final prediction.
Usage
## S4 method for signature 'EotStack'
predict(object, newdata, n = 1L, filename = "", ...)
## S4 method for signature 'EotMode'
predict(object, newdata, n = 1L, filename = "", ...)
Arguments
object |
An |
newdata |
The data to be used as predictor. |
n |
The number of modes to be used for the prediction.
See |
filename |
|
... |
Further arguments passed to |
Value
A SpatRaster of nlayers(newdata).
See Also
terra::app(), terra::writeRaster().
Examples
### not very useful, but highlights the workflow
sst = terra::unwrap(pacificSST)
pcp = terra::unwrap(australiaGPCP)
## train data using eot()
train <- eot(x = sst[[1:10]],
y = pcp[[1:10]],
n = 1)
## predict using identified model
pred <- predict(train,
newdata = sst[[11:20]],
n = 1)
## compare results
opar <- par(mfrow = c(1,2))
plot(pcp[[13]], main = "original", zlim = c(0, 10))
plot(pred[[3]], main = "predicted", zlim = c(0, 10))
par(opar)
Read Eot* files from disk
Description
Read Eot* related files from disk, e.g. for further use with
predict() or plot().
Usage
readEot(x, prefix = "remote", suffix = ".grd")
Arguments
x |
|
prefix |
|
suffix |
|
Value
An EotMode if a single mode is found on disk, or an EotStack
otherwise.
Author(s)
Florian Detsch
See Also
Examples
## Not run:
## calculate 3 leading modes
gph <- terra::unwrap(vdendool)
nh_modes <- eot(x = gph, n = 3, standardised = FALSE,
write.out = TRUE, path.out = tempdir())
## reimport related files
rm(nh_modes)
nh_modes <- readEot(tempdir())
nh_modes
## End(Not run)
Subset modes in an EotStack
Description
Extract a set of modes from an EotStack.
Usage
## S4 method for signature 'EotStack'
subset(x, subset, drop = FALSE, ...)
## S4 method for signature 'EotStack,ANY,ANY'
x[[i]]
Arguments
x |
|
subset |
|
drop |
If |
... |
Currently not used. |
i |
Index(es) or name(s) to be subset, delegated to |
Value
An EotMode if a single mode is selected and drop = TRUE, otherwise an
EotStack.
Examples
gph <- terra::unwrap(vdendool)
nh_modes <- eot(x = gph, y = NULL, n = 3,
standardised = FALSE,
verbose = TRUE)
subs <- subset(nh_modes, 2:3) # is the same as
subs <- nh_modes[[2:3]]
## effect of 'drop=FALSE' when selecting a single layer
subs <- subset(nh_modes, 2)
class(subs)
subs <- subset(nh_modes, 2, drop = TRUE)
class(subs)
## similarly to `drop = TRUE` above:
nh_modes[[2L]]
nh_modes[["mode_02"]]
Mean seasonal (DJF) 700 mb geopotential heights
Description
NCEP/NCAR reanalysis data of mean seasonal (DJF) 700 mb geopotential heights from 1948 to 1998
Usage
vdendool
Format
A PackedSpatRaster with the following attributes:
size : 14, 36, 50 (nrow, ncol, nlyr) resolution : 10, 5 (x, y) extent : -180, 180, 20, 90 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +no_defs
Details
NCEP/NCAR reanalysis data of mean seasonal (DJF) 700 mb geopotential heights from 1948 to 1998
Source
https://psl.noaa.gov/data/gridded/data.ncep.reanalysis.derived.pressure.html
Original Source: NOAA National Center for Environmental Prediction
References
The NCEP/NCAR 40-year reanalysis project
Kalnay et al. (1996)
Bulletin of the American Meteorological Society, Volume 77, Issue 3, pp 437 - 471
doi:10.1175/1520-0477(1996)077<0437:TNYRP>2.0.CO;2
Examples
terra::unwrap(vdendool)
Write Eot* objects to disk
Description
Write Eot* objects to disk. This is merely a wrapper around
terra::writeRaster() so see respective help section for details.
Usage
## S4 method for signature 'EotMode'
writeEot(x, path.out = ".", prefix = "remote", overwrite = TRUE, ...)
## S4 method for signature 'EotStack'
writeEot(x, ...)
Arguments
x |
An |
path.out |
The path to the folder to write the files to. |
prefix |
A prefix to be added to the file names (see Details). |
overwrite |
See |
... |
Further arguments passed to |
Details
writeEot() will write the results of either an EotMode or an EotStack
to disk. For each mode the following files will be written:
-
pred_r - the
SpatRasterof the correlation coefficients between the base point and each pixel of the predictor domain -
pred_rsq - as above but for the coefficient of determination
-
pred_rsq_sums - as above but for the sums of coefficient of determination
-
pred_int - the
SpatRasterof the intercept of the regression equation for each pixel of the predictor domain -
pred_slp - same as above but for the slope of the regression equation for each pixel of the predictor domain
-
pred_p - the
SpatRasterof the significance (p-value) of the the regression equation for each pixel of the predictor domain -
pred_resid - the
SpatRasterof the reduced data for the predictor domain
Apart from pred_rsq_sums, all these files are also created for the response domain as resp_*. These will be pasted together with the prefix & the respective mode so that the file names will look like, e.g.:
prefix_mode_n_pred_r.grd
for the SpatRaster of the predictor correlation coefficient
of mode n using the standard raster file type (.grd).
Functions
-
writeEot(EotStack): EotStack
See Also
Examples
## Not run:
gph <- terra::unwrap(vdendool)
nh_modes <- eot(x = gph, y = NULL, n = 2,
standardised = FALSE,
verbose = TRUE)
## write the complete EotStack
writeEot(nh_modes, prefix = "vdendool")
## write only one EotMode
writeEot(nh_modes[[2]], prefix = "vdendool")
## End(Not run)