MyNixOS website logo
Description

Render Sequence Plots using 'ggplot2'.

A set of wrapper functions that mainly re-produces most of the sequence plots rendered with TraMineR::seqplot(). Whereas 'TraMineR' uses base R to produce the plots this library draws on 'ggplot2'. The plots are produced on the basis of a sequence object defined with TraMineR::seqdef(). The package automates the reshaping and plotting of sequence data. Resulting plots are of class 'ggplot', i.e. components can be added and tweaked using '+' and regular 'ggplot2' functions.

ggseqplot: ggplotify sequence data plots

CRANstatus R-CMD-check Codecov testcoverage

The main goal of {ggseqplot} is to provide functions that reproduce the sequence plots from {TraMineR}’s seqplot using {ggplot2}. These plots are produced on the basis of state sequence objects defined with TraMineR::seqdef. The package automates the reshaping and plotting of sequence data. This library literally builds on the excellent work of the {TraMineR} and {ggplot2} developers and uses several of the their functions to produce ggplot2-flavored figures.

Note, that this library was not written because I personally dislike the plots produced by {TraMineR}, but rather because I am normally using {ggplot2} instead of base R’s plot environment for visualizing data. {TraMineR} was developed before {ggplot2} was as popular as it is today and back then many users were more familiar with coding base R plots. To date, however, many researchers and students are more accustomed to using {ggplot2} and prefer to draw on the related skills and experiences instead of learning how to refine base R plots just for the single purpose of visualizing sequence data.

{ggseqplot} contains the following functions:

  • ggseqdplot (equivalent to TraMineR::seqdplot)
  • ggseqeplot (equivalent to TraMineRextras::seqplot.tentrop)
  • ggseqmsplot (equivalent to TraMineR::seqmsplot)
  • ggseqmtplot (equivalent to TraMineR::seqmtplot)
  • ggstrqeplot (based on transitions rates computed with TraMineR::seqtrate)
  • ggseqiplot (equivalent to TraMineR::seqIplot)
  • ggseqfplot (equivalent to TraMineR::seqfplot)
  • ggseqrplot (equivalent to TraMineR::seqrplot)
  • ggseqrfplot (equivalent to TraMineRextras::seqplot.rf)

If you have change requests or find errors, create an issue on github or send me an email.

A complementing vignette outlines how {ggseqplot} reshapes sequence data generated with {TraMineR} functions to visualize them using {ggplot2}. Moreover, it illustrates how to adjust the baseline output using familiar {ggplot2} functions (and add-ons).

Installation

You can install the CRAN version of {ggseqplot} by typing:

install.packages("ggseqplot")

The development version can be installed with:

devtools::install_github("maraab23/ggseqplot")

Acknowledgements

I would like to thank Gilbert Ritschard, Tim Liao, and Emanuela Struffolino for their comments on earlier versions of this library.

Metadata

Version

0.8.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • 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