Last data update: 2014.03.03

R: Draw xy plots of results of multivariate analysis
s.varR Documentation

Draw xy plots of results of multivariate analysis

Description

A number of functions for graphically displaying results from between group, coinertia, or other multivariate analysis of gene expression data. s.var, s.groups and s.match.col are derived from ADE4 graphics modules, s.label, s.class and s.match respectively.

Usage


s.var(dfxy, xax = 1, yax = 2, label = row.names(dfxy), clabel = 1, pch = 20, 
      cpoint = if (clabel == 0) 1 else 0, neig = NULL, cneig = 2, xlim = NULL, 
      ylim = NULL, grid = TRUE, addaxes = TRUE, cgrid = 1, include.origin = TRUE, 
      origin = c(0, 0), sub = "", csub = 1.25, possub = "bottomleft", pixmap = NULL, 
      contour = NULL, area = NULL, add.plot = FALSE, colpoints = rep(1, nrow(dfxy)), 
      boxes = TRUE, ...)
s.groups(dfxy, classvec, wt = rep(1, length(classvec)), xax = 1, yax = 2, cstar = 1,
      cellipse = 1.5, axesell = TRUE, label = levels(classvec), slabel = row.names(dfxy),
      clabel = 1, cpoint = 1, pch = 20, col = rep(1, length(levels(classvec))),
      xlim = NULL, ylim = NULL, grid = TRUE, addaxes = TRUE, origin = c(0, 0), 
      include.origin = TRUE, sub = "", csub = 1, possub = "bottomleft", 
      cgrid = 1, pixmap = NULL, contour = NULL, area = NULL, add.plot = FALSE, ...)
s.match.col(df1xy, df2xy, xax = 1, yax = 2, pch = 20, cpoint = 1, 
      label = row.names(df1xy), clabel = 1, edge = TRUE, xlim = NULL, ylim = NULL, 
      grid = TRUE, addaxes = TRUE, cgrid = 1, include.origin = TRUE, origin = c(0, 0), 
      sub = "", csub = 1.25, possub = "bottomleft", pixmap = NULL, contour = NULL, 
      area = NULL, add.plot = FALSE, col = rep(1, nrow(df1xy)), classvec=NULL,...)

Arguments

dfxy

coordinates, normally the $ls, $co or $li coordinates from PCA, COA or BGA with at least two columns, containing the x,y coordinates to be plotted

df1xy, df2xy

coordinates from cia, normally the $mX, $mY coordinates with at least two columns, containing the x,y coordinates to be plotted

colpoints

Character, colour of arrays (cases),genes or points

xax

the column number for the x-axis

yax

the column number for the y-axis

classvec

Factor. A factor, classvec partitioning the rows of the data frame in classes

boxes

A logical, indicating whether a box should be drawn around each variable label. The default is TRUE

add.plot

logical if TRUE plot draw in current graphics window

origin, sub, wt, cstar, cellipse, axesell, col, edge

Graphing parameters. See s.label or s.class for details

clabel,pch, cpoint, neig, cneig, xlim, ylim, grid, addaxes, cgrid, include.origin, csub, possub, pixmap, contour, area

Graphing parameters, see s.match for details

...

further arguments passed to or from other method

Details

These functions are modified versions of s.label, s.class and s.match graph modules from ADE4. Please see s.label or s.class and s.match for father details.

These functions s.var, s.groups and s.match.col are called by plot.bga and plot.cia.

Author(s)

Aedin Culhane

See Also

See also s.class, s.label, s.match

Examples

data(khan)
if (require(ade4, quiet = TRUE)) {
khan.bga<-bga(khan$train, khan$train.classes)
attach(khan.bga)
par(mfrow=c(2,2))
s.var(bet$ls, col=as.numeric(khan$train.classes), clabel=0.8)
s.groups(bet$ls, khan$train.classes, add.plot=TRUE, 
col=c(1:length(levels(khan$train.classes))) )

}

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(made4)
Loading required package: ade4
Loading required package: RColorBrewer
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: scatterplot3d
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/made4/s.var.Rd_%03d_medium.png", width=480, height=480)
> ### Name: s.var
> ### Title: Draw xy plots of results of multivariate analysis
> ### Aliases: s.var s.groups s.match.col
> ### Keywords: multivariate internal
> 
> ### ** Examples
> 
> data(khan)
> if (require(ade4, quiet = TRUE)) {
+ khan.bga<-bga(khan$train, khan$train.classes)
+ attach(khan.bga)
+ par(mfrow=c(2,2))
+ s.var(bet$ls, col=as.numeric(khan$train.classes), clabel=0.8)
+ s.groups(bet$ls, khan$train.classes, add.plot=TRUE, 
+ col=c(1:length(levels(khan$train.classes))) )
+ 
+ }
> 
> 
> 
> 
> dev.off()
null device 
          1 
>