MyNixOS website logo
Description

Quantile Binned Plots.

Create quantile binned and conditional plots for Exploratory Data Analysis. The package provides several plotting functions that are all based on quantile binning. The plots are created with 'ggplot2' and 'patchwork' and can be further adjusted.

qbinplots

CRANstatus R-CMD-check Lifecycle:experimental

This package creates plots using quantile binning. Quantile binning is an exploratory data analysis tool that helps to see the distribution of the variables in a dataset as a function of the variable that is binned.

Installation

You can install the development version of qbinplots from GitHub with:

remotes::install_github("edwindj/qbinplots")

Example

library(qbinplots)
## basic example code

A quantile binning boxplot

qbin_boxplot(iris, "Sepal.Length", n = 12)

vs

A quantile binning barplot

qbin_barplot(iris, "Sepal.Length", n = 12)
table_plot(iris, "Sepal.Length", n=12)

vs

A quantile binning heatmap

qbin_heatmap(iris, "Sepal.Length", n=12, auto_fill = TRUE)
cond_boxplot(iris, "Sepal.Length", n=12, auto_fill = TRUE)
cond_barplot(iris, "Sepal.Length", n=12, auto_fill = TRUE)
funq_plot(iris, "Sepal.Length", 12, auto_fill = TRUE)
funq_plot(iris, "Sepal.Length", overlap = TRUE, min_bin_size = 20)

Choosing “Petal.Width”

funq_plot(iris, "Petal.Width", n=12)
library(palmerpenguins)
qbin_lineplot(penguins[1:7], x="body_mass_g", n = 19, ncols = 4)

Or the well-known diamonds dataset

data("diamonds", package = "ggplot2")
table_plot(diamonds[1:7], "carat")
data("diamonds", package = "ggplot2")
qbin_boxplot(diamonds[1:7], "carat")
funq_plot(diamonds[1:7], "carat")

We can zoom in on the carat variable, because the upper quantile bins are not very informative.

funq_plot(
  diamonds[1:7], 
  "carat", 
  auto_fill = TRUE,
  xlim = c(0, 2.5)
)
qbin_heatmap(
  iris,
  x = "Sepal.Length",
  n = 12,
  type="s"
)
qbin_heatmap(
  iris,
  x = "Sepal.Length",
  overlap = TRUE
)
Metadata

Version

0.3.3

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows