Last data update: 2014.03.03

R: Add a graphical object to an LDheatmap plot
LDheatmap.addGrobR Documentation

Add a graphical object to an LDheatmap plot

Description

Add a graphical object to an LDheatmap plot such that the x-axis corresponds to the physical map on the heatmap.

Usage

LDheatmap.addGrob(LDheatmap, grob, height = 0.2)

Arguments

LDheatmap

An object of class LDheatmap.

grob

A graphical object of classgrob.

height

The height of the viewport in which the grob will be placed.

Value

An object of class LDheatmap given as an argument, with the grob LDheatmapGrob modified to inclue the new child grob.

Author(s)

Sigal Blay <sblay@sfu.ca>

See Also

LDheatmap

Examples


data(GIMAP5.CEU) 
ll<-LDheatmap(GIMAP5.CEU$snp.data,GIMAP5.CEU$snp.support$Position,flip=TRUE)
llplusgrob<-LDheatmap.addGrob(ll, rectGrob())

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(LDheatmap)
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LDheatmap/LDheatmap.addGrob.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LDheatmap.addGrob
> ### Title: Add a graphical object to an LDheatmap plot
> ### Aliases: LDheatmap.addGrob
> ### Keywords: hplot
> 
> ### ** Examples
> 
> data(GIMAP5.CEU) 
> ll<-LDheatmap(GIMAP5.CEU$snp.data,GIMAP5.CEU$snp.support$Position,flip=TRUE)
Loading required package: chopsticks
Loading required package: survival
Information: The input contains 116 samples with 23 snps
... Done
> llplusgrob<-LDheatmap.addGrob(ll, rectGrob())
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>