plotframes {dad}R Documentation

Plotting of two sets of variables

Description

Plots a set of numeric variables vs. another set and prints the pairwise correlations. It uses the function xyplot of lattice package.

Usage

plotframes(x, y, xlab = NULL, ylab = NULL, font.size = 12, layout = NULL)

Arguments

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 y.

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.

Author(s)

Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard

Examples

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)

[Package dad version 4.1.2 Index]