Description Usage Arguments Value Examples
This function reads the output from SailoR.Indices()
and creates a summary data frame of the indices calculated for the Sailor diagram. This can easily be converted to a LaTeX or other formats with external packages ('xtable'
, for instance).
1 | SailoR.Table(UV, round_digits = 2)
|
UV |
a list containing the output obtained directly from |
round_digits |
number of decimals to be kept in the summary table. |
The result is a data frame with the information from the SailoR.Indices()
function in tabular format. Particularly, the indices stated in the table are the following ones:
modelName |
the names of the models datasets. |
sdUx |
standard deviation of zonal component (U). |
sdUy |
standard deviation of meridional component (U). |
sdVx |
standard deviation of zonal component (V). |
sdVy |
standard deviation of meridional component (V). |
Sigmax |
a scalar representing the semi-major axis of the ellipse (standard deviation of PC1). |
Sigmay |
a scalar representing the semi-minor axis of the ellipse (standard deviation of PC2). |
thetau |
angle of EOF1 (U) with zonal axis. |
thetav |
angle of EOF1 (V) with meridional axis. |
thetavu |
rotation angle from U EOFs to V EOFs. |
R2vec |
vector correlation squared in 2D as defined by Breaker, Gemmill and Crossby (1994). |
biasMag |
magnitude of the bias vector. |
RMSE |
root mean square error between U and V. |
Eccentricity |
eccentricity of the ellipses from the reference and models dataset. |
congruenceEOF1 |
congruence coefficients (absolute value) for EOF1. |
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 26 27 28 29 30 31 32 33 34 35 36 | #--------------------------------------------------------
# Example 1
#--------------------------------------------------------
# Load the ocean current data
data("Current")
# Calculate the statistics
ref<-Current[["ref"]]
mod<-Current[["mod"]]
UV <- SailoR.Indices(ref,mod)
# Obtain the summary of the results
SailoR.Table(UV)
#--------------------------------------------------------
# Example 2: Table 2 from Sáenz et al. (2020)
#--------------------------------------------------------
# Load Synthetic data
data(Synthetic)
ref<-Synthetic[["ref"]]
mod<-Synthetic[["mod"]]
# Calculate the statistics
UVtable=SailoR.Table(UV,round_digits = 4)
TotVar<-c((UVtable$sdUx^2+UVtable$sdUy^2)[1],
(UVtable$sdVx^2+UVtable$sdVy^2)[-1])
TotSigma<-UVtable$Sigmax^2+UVtable$Sigmay^2
UVtable<-cbind(UVtable[,1],TotVar,TotSigma,UVtable[,8:15])
UVtable<-round(UVtable[,-1],2)
#If you want to print it as a LaTeX table:
#library(xtable)
#oInfo<-xtable(UVtable)
#print(oInfo,type="latex",file="table.tex")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.