CommonMap draws two 1D plots, and links the common points between the two.
Usage
commonMap(x, y, hor=TRUE, cex=1.5, scaled=TRUE, ...)
Arguments
x
The coordinates of the first axis
y
The coordinates of the second axis
hor
Logical, whether a horizontal line should be drawn on plot. Default is TRUE.
cex
Numeric. The amount by which plotting text
and symbols should be scaled relative to the default
scaled
Logical, whether the data in x and y are scaled. Scaling is useful for
visualising small or large data values. Set to FALSE if actually or true values should
be visualised. The default is TRUE.
...
further arguments passed to or from other method
Details
Useful for mapping the genes in common from coinertia analysis
This graphs a 1D graph, x and y are the coordinates from two different analyses
but the rows of each vectors correspond (ie common genes)
Note
This is useful for examining common points in axes from coinertia analysis, or comparing results
from two different analysis.
Author(s)
Ailis Fagan and Aedin Culhane
See Also
See also between.graph,
graph1D
Examples
a<-rnorm(20)
b<-rnorm(20)
par(mfrow=c(2,2))
commonMap(a,b)
commonMap(a,b,hor=FALSE, col="red", pch=19)
commonMap(a,b,col="blue", cex=2, pch=19)
# If the vectors contain different variables, the rows should define the variables that correspond
a[15:20]<-NA
b[10:15]<-NA
cbind(a,b)
commonMap(a,b, col="dark green", pch=18)
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/commonMap.Rd_%03d_medium.png", width=480, height=480)
> ### Name: commonMap
> ### Title: Highlight common points between two 1D plots
> ### Aliases: commonMap
> ### Keywords: multivariate hplot
>
> ### ** Examples
>
> a<-rnorm(20)
> b<-rnorm(20)
> par(mfrow=c(2,2))
> commonMap(a,b)
> commonMap(a,b,hor=FALSE, col="red", pch=19)
> commonMap(a,b,col="blue", cex=2, pch=19)
>
> # If the vectors contain different variables, the rows should define the variables that correspond
> a[15:20]<-NA
> b[10:15]<-NA
> cbind(a,b)
a b
[1,] 2.31038595 0.2993768
[2,] -0.26014286 0.4776047
[3,] 0.09097414 -1.1843465
[4,] -0.11628475 1.4998104
[5,] -0.72856080 -0.6748700
[6,] 0.61424712 -1.1154563
[7,] -0.12273758 -0.0433700
[8,] 0.59563731 2.2297898
[9,] -0.44494763 0.4833035
[10,] -0.34049124 NA
[11,] -0.52590210 NA
[12,] 0.91565299 NA
[13,] -0.27905009 NA
[14,] 0.24114061 NA
[15,] NA NA
[16,] NA 0.5890931
[17,] NA -0.3713617
[18,] NA -2.4339458
[19,] NA -0.2707806
[20,] NA -0.3256618
> commonMap(a,b, col="dark green", pch=18)
>
>
>
>
>
>
> dev.off()
null device
1
>