MissingCasesPlot: MissingCasesPlot

View source: R/missingcasesplot.R

MissingCasesPlotR Documentation

MissingCasesPlot

Description

Show which cases in a data frame are missing

Usage

MissingCasesPlot(
  raw.data,
  fill.color = "#5C9AD3",
  fill.opacity = NULL,
  base.color = "#E6E6E6",
  base.opacity = 1,
  show.counts.missing = TRUE,
  show.percentages.missing = FALSE,
  subset = NULL,
  title = "Missing values by case",
  subtitle = "",
  footer = "",
  global.font.family = "Arial",
  global.font.color = "#2C2C2C",
  data.label.show = FALSE,
  data.label.position = "center",
  data.label.font.family = global.font.family,
  data.label.font.color = global.font.color,
  data.label.font.size = 10,
  data.label.bg.opacity = 0.5,
  title.font.family = global.font.family,
  title.font.color = global.font.color,
  title.font.size = 16,
  subtitle.font.family = global.font.family,
  subtitle.font.color = global.font.color,
  subtitle.font.size = 12,
  footer.font.family = global.font.family,
  footer.font.color = global.font.color,
  footer.font.size = 8,
  footer.wrap = TRUE,
  footer.wrap.nchar = 100,
  x.tick.font.family = global.font.family,
  x.tick.font.color = global.font.color,
  x.tick.font.size = 11,
  x.tick.label.wrap = NULL,
  x.tick.label.wrap.nchar = 20,
  x.tick.angle = NULL,
  y.tick.font.family = global.font.family,
  y.tick.font.color = global.font.color,
  y.tick.font.size = 10,
  tooltip.show = FALSE,
  enable.zoom = TRUE,
  hovertext.font.family = global.font.family,
  hovertext.font.color = "#FFFFFF",
  hovertext.font.size = 11,
  margin.top = NULL,
  margin.bottom = NULL,
  margin.left = NULL,
  margin.right = NULL,
  font.unit = "px"
)

Arguments

raw.data

Matrix or data frame.

fill.color

Color to show the missing value.

fill.opacity

Alpha transparence between 0 and 1 (or NULL). By default automatically tries to adjust opacity depending on the number of missing values. However if there is a very high density of missing values, you may need to manually reduce the fill opacity to observe differences in saturated regions.

base.color

Background color of chart.

base.opacity

Opacity of background color.

show.counts.missing

Include the number of cases missing in the variable label.

show.percentages.missing

Include the percentage of cases missing in the variable label.

subset

Logical vector indicating whether each row of the data frame should be included. This vector should be the same length as the number of rows in raw.data. Missing data with rows where subset is false will not be shown.

title

Character; chart title.

subtitle

Character

footer

Character

global.font.family

Character; font family for all occurrences of any font attribute for the chart unless specified individually.

global.font.color

Global font color as a named color in character format (e.g. "black") or an a hex code.

data.label.show

Logical; whether to show data labels.

data.label.position

One of "center", "above" or "below".

data.label.font.family

Character; font family for data label.

data.label.font.color

Font color as a named color in character format (e.g. "black") or an a hex code. This can be a single color, a vector of colors (1 for each series/column), or a comma separated list of colors

data.label.font.size

Integer; Font size for data label.px.

data.label.bg.opacity

Numeric between 0 (tranparent) to 1 (opaque), specifying the opacity of the data label background (grey).

title.font.family

Character; title font family. Can be "Arial Black", "Arial", "Comic Sans MS", "Courier New", "Georgia", "Impact", "Lucida Console", "Lucida Sans Unicode", "Marlett", "Symbol", "Tahoma", "Times New Roman", "Trebuchet MS", "Verdana", "Webdings"

title.font.color

Title font color as a named color in character format (e.g. "black") or a hex code.

title.font.size

Integer; Title font size; default = 10.

subtitle.font.family

Character; subtitle font family

subtitle.font.color

subtitle font color as a named color in character format (e.g. "black") or an a hex code.

subtitle.font.size

Integer; subtitle font size

footer.font.family

Character; footer font family

footer.font.color

footer font color as a named color in character format (e.g. "black") or an a hex code.

footer.font.size

Integer; footer font size

footer.wrap

Logical; whether the footer text should be wrapped.

footer.wrap.nchar

Number of characters (approximately) in each line of the footer when footer.wrap TRUE.

x.tick.font.family

Character; x-axis tick label font family

x.tick.font.color

X-axis tick label font color as a named color in character format (e.g. "black") or an a hex code.

x.tick.font.size

Integer; x-axis tick label font size

x.tick.label.wrap

Logical; whether to wrap long labels on the x-axis.

x.tick.label.wrap.nchar

Number of characters wide the x-axis labels should be before wrapping.

x.tick.angle

x-axis tick label angle in degrees. 90 = vertical; 0 = horizontal

y.tick.font.family

Character; y-axis tick label font family

y.tick.font.color

y-axis tick label font color as a named color in character format (e.g. "black") or an a hex code.

y.tick.font.size

Integer; y-axis tick label font size

tooltip.show

Logical, indicating whether or not to show a tooltip on hover. The default is off, because turning on tooltips with large data sets can make the chart slow to render.

enable.zoom

Logical, indicating whether of not to allow the chart to be zoomable.

hovertext.font.family

Font family of hover text.

hovertext.font.color

Color of hovertext as a string or hex code.

hovertext.font.size

Font size of hover text.

margin.top

Margin between plot area and the top of the graphic in pixels

margin.bottom

Margin between plot area and the bottom of the graphic in pixels

margin.left

Margin between plot area and the left of the graphic in pixels

margin.right

Margin between plot area and the right of the graphic in pixels

font.unit

One of "px" of "pt". By default all font sizes are specified in terms of pixels ("px"). But changing this to "pt" will mean that the font sizes will be in terms points ("pt"), which will be consistent with font sizes in text boxes.

Examples

z <- structure(c(1L, 2L, 3L, 4L, 5L, 2L, 3L, 4L, 5L, 6L),  .Dim = c(5L, 2L),
      .Dimnames = list(c("T", "U", "V", "W", "X"), c("A", "B")))
Column(z, type="Stacked Column")

NumbersInternational/flipStandardCharts documentation built on Feb. 26, 2024, 5:43 a.m.