poplin_naplot: Missing value plot

Description Usage Arguments Value Examples

View source: R/plot-naplot.R

Description

Visualize data for exploring missing value (NA) patterns. All values in a data matrix are recoded (1: missing; 0: non-missing) and visualized by rectangles.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Default S3 method:
poplin_naplot(
  x,
  widths = NULL,
  heights = NULL,
  colors = viridis::viridis(2),
  label = FALSE,
  digits = 2,
  grid_gap = 1,
  hide_colorbar = TRUE,
  showticklabels = c(TRUE, FALSE),
  row_dend_left = FALSE,
  ...
)

## S3 method for class 'poplin'
poplin_naplot(
  x,
  xin,
  widths = NULL,
  heights = NULL,
  colors = viridis::viridis(2),
  label = FALSE,
  digits = 2,
  grid_gap = 1,
  hide_colorbar = TRUE,
  showticklabels = c(TRUE, FALSE),
  row_dend_left = FALSE,
  ...
)

Arguments

x

A matrix or poplin object.

widths

Relative widths of heatmap and dendrogram.

heights

Relative heights of heatmap and dendrogram.

colors

A vector of colors for heatmap.

label

Logical controlling whether cell values are shown.

digits

The desired number of digits when label = TRUE.

grid_gap

Numeric specifying the gap between cells.

hide_colorbar

Logical controlling whether the color bar (legend) is hidden.

showticklabels

A logical vector of length 2 (x-axis, y-axis). If FALSE, the ticks are removed from the sides of the plot.

row_dend_left

Logical controlling whether the row dendrogram is placed on the left on the plot.

...

Additional arguments passed to heatmaply (heatmaply package).

xin

Character specifying the name of data to retrieve from x when x is a poplin object.

Value

A gtable of aligned plots

Examples

1
2
3
4
5
6
7
8
data(faahko_poplin)

## poplin object
poplin_naplot(faahko_poplin, xin = "raw")

## matrix
m <- poplin_raw(faahko_poplin, "raw")
poplin_naplot(m)

jaehyunjoo/poplin documentation built on Jan. 8, 2022, 1:13 a.m.