create.heatmap: Create a heatmap.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/create.heatmap.R

Description

Create a heatmap from data within a data frame.

Usage

1
create.heatmap(data, x, y, fill = NULL, xlab = NULL, ylab = NULL, filename = NULL, resolution = NULL, base.size = 20, theme = NULL, colour.scheme = NULL)

Arguments

data

data frame containing the data to plot

x

the dataframe column name containing the data to plot on the x-axis

y

the dataframe column name containing the data to plot on the y-axis

fill

column to use for the heatmap colours

xlab

label for the x-axis

ylab

label for the y-axis

filename

filename containing plot

resolution

resolution of the plot

base.size

base size for fonts on the heatmap, this is used by default.heatmap.theme (default: 20)

theme

theme for the plot

colour.scheme

A vector of two colours to use for the colourkey in the legend

Value

Returns the ggplot2 object if no filename is passed, otherwise returns the exit code for the creation of the plot.

Author(s)

Richard de Borja <richard.deborja@sickkids.ca>

See Also

write.plot

Examples

1
2
3
4
5
6
7
8
9
  # create a simple heatmap
  mtcars$car <- rownames(mtcars)
  create.heatmap(
    data = mtcars,
    x = 'car',
    y = 'cyl',
    xlab = '',
    ylab = 'Number of Cylinders'
    )

rdeborja/plotting.general documentation built on May 27, 2019, 3:05 a.m.