plotframes | R Documentation |
Plots a set of numeric variables vs. another set and prints the pairwise correlations. It uses the function xyplot
of lattice
package.
plotframes(x, y, xlab = NULL, ylab = NULL, font.size = 12, layout = NULL)
x |
data frame (can also be a tibble). Variables on x coordinates. |
y |
data frame (or tibble). Variables on y coordinates. |
xlab |
a label for the x axis, by default the column names of |
ylab |
a label for the y axis (by default there is no label). |
font.size |
integer. Size of the characters in the strips. |
layout |
numeric vector of length 2 or 3 giving the number of columns, rows, and optionally pages of the lattice. If omitted, the graphs will be displayed on 3 lines and 3 columns, with a number of pages set to the required number. |
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
require(MASS)
mx <- c(0,0)
vx <- matrix(c(1,0,0,1),ncol = 2)
my <- c(0,1)
vy <- matrix(c(4,1,1,9),ncol = 2)
x <- as.data.frame(mvrnorm(n = 10, mu = mx, Sigma = vx))
y <- as.data.frame(mvrnorm(n = 10, mu = my, Sigma = vy))
colnames(x) <- c("x1", "x2")
colnames(y) <- c("y1", "y2")
plotframes(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.