Description Usage Arguments Value Examples
View source: R/linked_function.R
Plots a linked chart for exploratory data analysis from a dcmatrix object using the functionality provided by the "rlc" package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | linked(
dcmatrix,
X = NULL,
Y = NULL,
heatmap = "dcor",
heatmap0 = "dcor",
size = 2,
opacity = 1,
discX = NULL,
discY = NULL,
jitt.disc = 0.1,
jitt.cont = 0,
smooths = "none",
smooth.type = "loess",
cgtabmax = NULL,
subdat = NULL,
subs = NULL,
palette.heatmap = RColorBrewer::brewer.pal(9, "Reds"),
palette.heatmap0 = RColorBrewer::brewer.pal(9, "YlGnBu"),
coldom = NULL,
coldom0 = NULL,
...
)
|
dcmatrix |
A dcmatrix object |
X |
should only be specified if the dcmatrix object does not contain the original data (see argument "return.data" of dcmatrix); should contain the same data as used in the calculation of the dcmatrix object. |
Y |
see X. |
heatmap |
specifies the dependence measure to use for the heatmap. Options are "dcor", "dcov", "logp" (for -log10 of the p-value), "cor" (for Pearson correlation) and "abscor" (for the absolute value of Pearson correlation). |
heatmap0 |
Only applicable if the dcmatrix object contains dependencies between objects that are not one-dimensional. In this case, two heatmaps are plotted, the first using the dependence meausure specified in heatmap0 and the dependencies between the groups in dcmatrix, the second using the dependence masure specified in heatmap and between the corresponding univariate variables. |
size |
Passed to the options of the scatter plot. |
opacity |
Passed to the options of the scatter plot. |
discX |
Numeric vector specifying which columns in X should be interepreted as discrete variables. Factors and characters are always interpreted as discrete. |
discY |
see discX |
jitt.disc |
Jitter added to discrete variables. |
jitt.cont |
Jitter added to continuous variables. |
smooths |
specifies smooths that fitted to the scatter plots. Options include "none", "xtoy" (x as predictor, y as dependent variable), "ytox" (y as predictor, x as dependent variable) and "both". |
smooth.type |
Type of the plotted smooths. Options are "loess", "spline" or "regline". |
cgtabmax |
If set to a numeric value, a contingency table is shown for any pair of variables for which each of the variable has not more than cgtabmax unique values. |
subdat |
optional; Data.frame with the same number of observations as the original data. |
subs |
Names of some factor(!) variables in subdat. This allows to color the observations corresponding to these variables. |
palette.heatmap |
Passed to the options of the heatmap. |
palette.heatmap0 |
Only applicable if the dcmatrix object contains dependencies between objects that are not one-dimensional. In this case, passed to the options of the corresponding heatmap. |
... |
passed to the functions used for the smooths. |
A linked chart object opening in the browser.
If the dcmatrix object contains only associations between univariate observations, this will consist of one heatmap with corresponding scatterplots.
If the dcmatrix contains associations between groups of variables, there are three windows. The first window displays a fixed heatmap contains the associations between the groups. The second window contains a changing heatmap containing the associations between single observations in selected groups. The third windows display a scatter plot between selected single observations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | A linked chart object opening in the browser.
X <- matrix(rnorm(1000), ncol = 10)
dcm <- dcmatrix(X, return.data = TRUE)
linked(dcm)
X <- matrix(rnorm(1000), ncol = 10)
dcm <- dcmatrix(X, return.data = TRUE, calc.dcor.pw = TRUE, group.X = c(rep("group1",3),rep("group2",3),rep("group3",4)))
linked(dcm)
Y <- matrix(rnorm(600), ncol = 6)
Y[,5] <- rbinom(100, 3, 0.5)
Y[,6] <- rbinom(100, 2, 0.3)
dcm <- dcmatrix(X, Y, return.data = TRUE, calc.dcor.pw = TRUE, group.X = c(rep("group1",3),rep("group2",3),rep("group3",4)), group.Y = c(rep("group1",4),rep("group2",1),rep("group3",1)), metr.Y = c("group1" = "euclidean", "group2" = "discrete", "group3" = "discrete"))
linked(dcm, discY = c(5,6))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.