view_heatmap: Create a heatmap of values (usually correlation...

Description Usage Arguments Value Examples

View source: R/view_heatmap.R

Description

Create a heatmap of values (usually correlation coefficients).

Usage

1
2
3
4
view_heatmap(data, y = names(data[1]), x = names(data[2]),
  value = names(data[3]), colours = c("skyblue4", "darkorange2"),
  number.colours = 2, values.text = TRUE, values.size = 5, ylab = "",
  xlab = "", legend.title = expression("Correlation" * ~rho))

Arguments

data

The correlation dataset.

colours

The spectrum of colours for the heatmap, as a vector between the lowest (negative) value and the highest (positive) value

number.colours

Number of colour spectrums to use.

values.size

Font size of the values.

ylab

Y-axis label.

xlab

X-axis label.

legend.title

Title of the legend.

values

Whether or not the values are put on the plot.

Value

Creates a heatmap plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
ds <- data.frame(Var1 = rep(letters[1:6], times = 6),
     Var2 = rep(letters[1:6], each = 6),
     Values = round(runif(36, min = -1, max = 1), 2))

view_heatmap(ds)
view_heatmap(ds, 'Var1', 'Var2', 'Values')
view_heatmap(ds, colours = c('darkblue', 'darkred'), values.text = FALSE)
view_heatmap(ds, 'Var1', 'Var2', 'Values', number.colours = 100)
view_heatmap(ds, 'Var1', 'Var2', 'Values', number.colours = 100, values.size = 10)
view_heatmap(ds, 'Var1', 'Var2', 'Values', number.colours = 100, values.size = 10)

## End(Not run)

lwjohnst86/seer documentation built on May 21, 2019, 9:15 a.m.