heatmap.io: Heatmap Visualization

Description Usage Arguments Details Note Author(s) Examples

View source: R/heatmap.io.R

Description

A visualization tool for matrices belonging to an input-output system.

Usage

1
2
3
4
heatmap.io(obj, RS_label = NULL, regions_x = 'all', sectors_x = 'all', 
           regions_y = 'all', sectors_y = 'all',
           ES_x = NULL, ES_y = NULL, FUN = NULL, low = NULL, high = NULL,
           min = NA, max = NA)

Arguments

obj

The object you wish to create a heat map for that corresponds to the RS_label

RS_label

The RS_label located in an InputOutput object. See as.inputoutput

regions_x

The regions you wish to plot on the x-axis. This can either be the numerical order the regions occur or the name of the regions. The default is 'all'.

sectors_x

The sectors you wish to plot on the x-axis. This can either be the numerical order the sectors occur or the name of the sectors. The default is 'all'.

regions_y

The regions you wish to plot on the y-axis. This can either be the numerical order the regions occur or the name of the regions. The default is 'all'.

sectors_y

The sectors you wish to plot on the y-axis. This can either be the numerical order the sectors occur or the name of the sectors. The default is 'all'.

ES_x

Instead of specifying regions and sectors individually, you can use an EasySelect object (see easy.select). If supplied, the regions and sectors are overridden.

ES_y

See ES_x

FUN

The transformation of the elements in obj such as log()

low

The color of the low values. Default is "yellow".

high

The color of the high values. Default is "blue".

min

The minimum value for the color legend. Default of NA == min(obj). Both min and max must be provided to change default.

max

The maximum value for the color legend. Default of NA == max(obj). Both min and max must be provided to change default.

Details

heatmap.io uses ggplot2::geom_tiles() to create the visualization of the object.

Note

The coloring follows the temperatures of stars!

Author(s)

John J. P. Wade

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(toy.IO)
class(toy.IO)

RS_label = toy.IO$RS_label
obj = toy.IO$L
heatmap.io(obj, RS_label, FUN = log, max = 3)

cuberoot = function(x){x^(1/3)}
heatmap.io(obj, RS_label, FUN = cuberoot)

# Total field of influence
fit = f.influence.total(toy.IO)
heatmap.io(fit, RS_label, sectors_x = c(1,3,4,5), regions_y = c(2), sectors = 1:3)

data(toy.ES)
ES2 = matrix(c(1,5,6,8,9))
class(ES2) = 'EasySelect'
heatmap.io(fit, RS_label, ES_x = toy.ES, ES_y = ES2, 
           low = '#00fcef', high = 'blueviolet')

ioanalysis documentation built on Jan. 13, 2021, 5:16 p.m.