CorPlot: Correlation Matrix Plot

Description Usage Arguments Details Author(s) See Also Examples

Description

Plots a matrix of variables with #1 scatterplots in the lower triangle, #2 correlation values (or other ObjFct metrics) in the upper triangle, and #3 histograms along the diagonal.

Usage

1
CorPlot(x, objfct = "Spearman", cols = NULL, ...)

Arguments

x

data.frame or matrix with values that should be plotted

objfct

Which objective function metric should be shown in the upper triangle of the matrix?

cols

vector of colours that should be used

...

further arguments to plot functions

Details

This function plots a matrix with scatter plots.

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

See Also

ObjFct

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# create some data
a <- 1:30
b <- 30:1
c <- rnorm(30)
d <- a + rnorm(30, 0, 5)
e <- b + rnorm(30, 0, 15)
f <- a * exp(c)
x <- cbind(a, b, d, e, f)

# default plot with Spearman correlation 
CorPlot(x)

# other objective function metrics
CorPlot(x, objfct="Cor")
CorPlot(x, objfct="KS")
CorPlot(x, objfct="IoA")
CorPlot(x, objfct="MEF")
CorPlot(x, objfct="RMSE")

# other colours
CorPlot(x, objfct="RMSE", cols=c("blue", "red"))

# with text
CorPlot(x, objfct="Cor", cols=c("blue", "red"), prefix="r = ")

ModelDataComp documentation built on Nov. 22, 2020, 3 a.m.