Last data update: 2014.03.03

R: Plotting two numeric matrices
pairs2R Documentation

Plotting two numeric matrices

Description

The function plots each variable contained in the matrix 'x' against the all variables contained in matrix 'y'. The function is not very sophisticated and only used to consider the residuals in a multivariate regression.

Usage

pairs2(x, y, mars = c(4, 4, 0.1, 0.1), ...)

Arguments

x

a numeric matrix. Same number or rows as y.

y

a numeric matrix. Same number or rows as x.

mars

A numerical vector of the form 'c(bottom, left, top, right)' which gives the number of lines of margin to be specified on the four sides of the plot. The default is c(4, 4, 0.1, 0.1).

...

Arguments to be passed to methods, such as graphical parameters (see par). Should not contain xlab and ylab.

Author(s)

Klaus Nordhausen

Examples

X <- rmvnorm(50, c(0,0,1))
Y <- rmvnorm(50, c(20,1), matrix(rep(0.5,4),ncol=2))
colnames(X) <- LETTERS[1:3]
colnames(Y) <- letters[1:2]
pairs2(X,Y)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MNM)
Loading required package: ICSNP
Loading required package: mvtnorm
Loading required package: ICS
Loading required package: SpatialNP
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MNM/pairs2.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pairs2
> ### Title: Plotting two numeric matrices
> ### Aliases: pairs2
> ### Keywords: hplot
> 
> ### ** Examples
> 
> X <- rmvnorm(50, c(0,0,1))
> Y <- rmvnorm(50, c(20,1), matrix(rep(0.5,4),ncol=2))
> colnames(X) <- LETTERS[1:3]
> colnames(Y) <- letters[1:2]
> pairs2(X,Y)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>