View source: R/scatterMatrix.R
scatterMatrix | R Documentation |
scatterMatrix produces a matrix with jittered scatterplots, histograms, and correlation coefficients.
scatterMatrix(
dat,
items = NULL,
itemLabels = NULL,
plotSize = 180,
sizeMultiplier = 1,
pointSize = 1,
axisLabels = "none",
normalHist = TRUE,
progress = NULL,
theme = ggplot2::theme_minimal(),
hideGrid = TRUE,
conf.level = 0.95,
...
)
## S3 method for class 'scatterMatrix'
print(x, ...)
dat |
A dataframe containing the items in the scale. All variables in this dataframe will be used if items is NULL. |
items |
If not NULL, this should be a character vector with the names of the variables in the dataframe that represent items in the scale. |
itemLabels |
Optionally, labels to use for the items (optionally, named,
with the names corresponding to the |
plotSize |
Size of the final plot in millimeters. |
sizeMultiplier |
Allows more flexible control over the size of the plot elements |
pointSize |
Size of the points in the scatterplots |
axisLabels |
Passed to ggpairs function to set axisLabels. |
normalHist |
Whether to use the default ggpairs histogram on the
diagonal of the scattermatrix, or whether to use the |
progress |
Whether to show a progress bar; set to |
theme |
The ggplot2 theme to use. |
hideGrid |
Whether to hide the gridlines in the plot. |
conf.level |
The confidence level of confidence intervals |
... |
Additional arguments for |
x |
The object to print. |
An object with the input and several output variables. Most notably:
output$scatterMatrix |
A scattermatrix with histograms on the diagonal and correlation coefficients in the upper right half. |
Gjalt-Jorn Peters
Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com
### Note: the 'not run' is simply because running takes a lot of time,
### but these examples are all safe to run!
## Not run:
### Generate a datafile to use
exampleData <- data.frame(item1=rnorm(100));
exampleData$item2 <- exampleData$item1+rnorm(100);
exampleData$item3 <- exampleData$item1+rnorm(100);
exampleData$item4 <- exampleData$item2+rnorm(100);
exampleData$item5 <- exampleData$item2+rnorm(100);
### Use all items
scatterMatrix(dat=exampleData);
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.