Last data update: 2014.03.03

R: Graph xy plot of variable (array) projections from...
plotarraysR Documentation

Graph xy plot of variable (array) projections from ordination, between group analysis or coinertia analysis.

Description

Graph xy plot of variables using s.var, s.groups or s.match.col. Useful for visualising array coordinates ($li) resulting from ord, bga or cia of microarray data.

Usage

plotarrays(coord, axis1 = 1, axis2 = 2, arraylabels = NULL, classvec=NULL,  graph = c("groups", "simple", "labels", "groups2", "coinertia","coinertia2"), labelsize=1, star=1, ellipse=1, arraycol=NULL, ...)

Arguments

coord

a data.frame or matrix or object from ord bga or cia analysis with at least two columns, containing x, y coordinates to be plotted

axis1

An integer, the column number for the x-axis. Default is 1, so axes 1 is dudivar[,1]

axis2

An integer, the column number for the y-axis. Default is 2, so axes 2 is dudivar[,2]

arraylabels

A vector of variables labels. Default is row.names(coord)

classvec

A factor or vector which describes the classes in coord. Default is NULL. If included variables will be coloured by class.

graph

A character of type "groups", "simple", "labels", "groups2", "coinertia" or "coinertia2" which specifies the type of plot type or "graph" to be drawn. By default the graph will be selected depending on the class of cooord, and whether a classvector is specified

labelsize

Size of sample labels, by default=1

star

If drawing groups, whether to join samples to centroid creating a "star"

ellipse

If drawing groups, whether to draw an ellipse or ring around the samples

arraycol

Character with length equal to the number of levels in the factor classvec. Colors for each of the levels in the factor classvec

...

further arguments passed to or from other method

Details

plotarrays calls the function s.var, s.groups or s.match.col.

If you wish to return a table or list of the top array at the end of an axis, use the function topgenes.

Value

An xy plot

Note

plotarrays plots variables using s.var, s.groups, s.match.col which are modifieds version of s.label, s.class. , and s.match.

Author(s)

Aedin Culhane

See Also

See Also as s.var and s.label

Examples

data(khan)
if (require(ade4, quiet = TRUE)) {
khan.bga<-bga(khan$train, khan$train.classes) 
}
attach(khan.bga)
par(mfrow=c(2,1))
plotarrays(khan.bga)
plotarrays(khan.bga, graph="simple")
plotarrays(khan.bga, graph="labels")
plotarrays(khan.bga, graph="groups")
plotarrays(khan.bga, graph="groups2")

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/plotarrays.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotarrays
> ### Title: Graph xy plot of variable (array) projections from ordination,
> ###   between group analysis or coinertia analysis.
> ### Aliases: plotarrays
> ### Keywords: multivariate hplot
> 
> ### ** Examples
> 
> data(khan)
> if (require(ade4, quiet = TRUE)) {
+ khan.bga<-bga(khan$train, khan$train.classes) 
+ }
> attach(khan.bga)
> par(mfrow=c(2,1))
> plotarrays(khan.bga)
> plotarrays(khan.bga, graph="simple")
> plotarrays(khan.bga, graph="labels")
> plotarrays(khan.bga, graph="groups")
> plotarrays(khan.bga, graph="groups2")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>