-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
107 lines (81 loc) · 4.4 KB
/
README.Rmd
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
output: github_document
editor_options:
markdown:
wrap: 72
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ggseqplot: ggplotify sequence data plots <img src="man/figures/logo.png" align="right" height="139"/>
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/ggseqplot)](https://cran.r-project.org/package=ggseqplot)
[![R-CMD-check](https://github.com/maraab23/ggseqplot/workflows/R-CMD-check/badge.svg)](https://github.com/maraab23/ggseqplot/actions)
[![Codecov test coverage](https://codecov.io/gh/maraab23/ggseqplot/branch/main/graph/badge.svg)](https://app.codecov.io/gh/maraab23/ggseqplot?branch=main)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/ggseqplot)](https://cranlogs.r-pkg.org/badges/grand-total/ggseqplot)
[![Codecov test coverage](https://codecov.io/gh/maraab23/ggseqplot/graph/badge.svg)](https://app.codecov.io/gh/maraab23/ggseqplot)
<!-- badges: end -->
The main goal of [`{ggseqplot}`](https://maraab23.github.io/ggseqplot/) is to
provide functions that reproduce the sequence plots from
[`{TraMineR}`](http://traminer.unige.ch){target="\_blank"}'s `seqplot`
using [`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"}.
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}`](http://traminer.unige.ch){target="\_blank"} and
[`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"}
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}`](http://traminer.unige.ch){target="\_blank"}, but rather
because I am normally using
[`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"} instead of
base R's `plot` environment for visualizing data.
[`{TraMineR}`](http://traminer.unige.ch){target="\_blank"} was developed before
[`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"} 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}`](https://ggplot2.tidyverse.org/){target="\_blank"} 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}`](https://maraab23.github.io/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](https://github.com/maraab23/ggseqplot/issues/new) on github or
send me an
[email](mailto:marcel.raab@ifb.uni-bamberg.de?subject=ggseqplot%3A%20feature%20request).
A complementing [vignette](https://maraab23.github.io/ggseqplot/articles/ggseqplot.html) outlines how [`{ggseqplot}`](https://maraab23.github.io/ggseqplot/) reshapes sequence data
generated with [`{TraMineR}`](http://traminer.unige.ch){target="\_blank"} functions to visualize them using
[`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"}. Moreover, it
illustrates how to adjust the baseline output using familiar
[`{ggplot2}`](https://ggplot2.tidyverse.org/){target="\_blank"}
functions (and add-ons).
## Installation
You can install the CRAN version of [`{ggseqplot}`](https://maraab23.github.io/ggseqplot/) by typing:
``` r
install.packages("ggseqplot")
```
The development version can be installed with:
``` r
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.