R: Simple graphical inspection of dataframe summaries

show_plot {inspectdf} | R Documentation

## Simple graphical inspection of dataframe summaries

### Description

Easily visualise output from `inspect_*()` functions.

### Usage

    show_plot(
      x,
      text_labels = TRUE,
      alpha = 0.05,
      high_cardinality = 0,
      plot_layout = NULL,
      col_palette = 0,
      plot_type = 1,
      label_thresh = 0.1,
      label_angle = NULL,
      label_color = NULL,
      label_size = NULL
    )

### Arguments

`x` | Dataframe resulting from a call to an `inspect_*()` function.
`text_labels` | Boolean. Whether to show text annotation on plots. Defaults to `TRUE`.
`alpha` | Alpha level for performing any significance tests. Defaults to 0.05.
`high_cardinality` | Minimum number of occurrences of category to be shown as a distinct segment in the plot (`inspect_cat()` only). Default is 0 - all distinct levels are shown. Setting `high_cardinality > 0` can speed up plot rendering when categorical columns contain many near-unique values.
`plot_layout` | Vector specifying the number of rows and columns in the plotting grid. For example, 3 rows and 2 columns would be specified as `plot_layout = c(3, 2)`.
`col_palette` | Integer indicating the colour palette to use: `0`: (default) 'ggplot2' color palette `1`: a colorblind friendly palette `2`: 80s theme `3`: rainbow theme `4`: mario theme `5`: pokemon theme
`plot_type` | Experimental. Integer determining plot type to print. Defaults to 1.
`label_thresh` | (`inspect_cat()` only. Minimum occurrence frequency of category for a text label to be shown. Smaller values of `label_thresh` will show labels for less common categories but at the expense of increased plot rendering time. Defaults to 0.1.
`label_angle` | Numeric value specifying angle with which to rotate text annotation, if applicable. Defaults to 90 for most plots.
`label_color` | Character string or character vector specifying colors for text annotation, if applicable. Usually defaults to white and gray.
`label_size` | Numeric value specifying font size for text annotation, if applicable.

### Examples

    # Load 'starwars' data
    data("starwars", package = "dplyr")

    # Horizontal bar plot for categorical column composition
    x <- inspect_cat(starwars)
    show_plot(x)

    # Correlation betwee numeric columns + confidence intervals
    x <- inspect_cor(starwars)
    show_plot(x)

    # Bar plot of most frequent category for each categorical column
    x <- inspect_imb(starwars)
    show_plot(x)

    # Bar plot showing memory usage for each column
    x <- inspect_mem(starwars)
    show_plot(x)

    # Occurence of NAs in each column ranked in descending order
    x <- inspect_na(starwars)
    show_plot(x)

    # Histograms for numeric columns
    x <- inspect_num(starwars)
    show_plot(x)

    # Barplot of column types
    x <- inspect_types(starwars)
    show_plot(x)

[Package inspectdf version 0.0.11 Index]