Description Usage Arguments Value Examples
corrplotmask
is an input mask for the corrplot()
function of the
package corrplot. corrplot()
visualizes correlation matrizes. See
?corrplot()
for further info.
corrplotmask
allows to get a nice, basic corrplot graphic as a png-file
that is directly saved to the file system. It doesn't allow to define specific
plot settings.
1 2 | corrplotmask(corrmatrix, xmatrix = "notact", mypath,
voi = 1:ncol(corrmatrix), w = 3000, h = 3000)
|
corrmatrix |
correlation matrix (as produced by varnastats::corrmat()) |
xmatrix |
correlation matrix only with the values 0 and 1, where 1 serves as a marker (as produced by varnastats::corrmat(method="chi2")). Relations with the value 1 will be marked with an X in the corrplot. default = 0 (nothing is marked) |
mypath |
file.path where the plot file should be stored mypath <- file.path("~/path/to/my/directory/",paste("myfilename", ".png", sep = "")) |
voi |
vector of indezes of variables/objects that should be shown on the x-axis. default = 1:length(corrmatrix[1,]) (every variable/object is shown) |
w |
width of the resulting graphic file in px default = 3000 |
h |
height of the resulting graphic file in px default = 3000 |
graphic file of a correlation matrix plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | testmatrixrand <- data.frame(
matrix(base::sample(0:1,400,replace=TRUE), nrow=20, ncol=20)
)
testcorr <- corrmat(testmatrixrand, "lambda", chi2limit = 0.1, dim = 1)
xtestcorr <- corrmat(testmatrixrand, "chi2", chi2limit = 0.1, dim = 1)
testpath <- file.path(".",paste("testfile", ".png", sep = ""))
corrplotmask(
corrmatrix = testcorr,
xmatrix = xtestcorr,
mypath = testpath,
voi = 1:10,
w = 500,
h = 1000
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.