Skip to content

Commit eeea5c9

Browse files
maraab23cran-robot
authored andcommitted
version 0.8.1
1 parent 20cd397 commit eeea5c9

39 files changed

+2124
-303
lines changed

DESCRIPTION

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
Package: ggseqplot
22
Title: Render Sequence Plots using 'ggplot2'
3-
Version: 0.8.0
3+
Version: 0.8.1
44
Authors@R:
55
person("Marcel", "Raab", , "marcel.raab@gmail.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0002-3097-1591"))
7-
Description: A set of wrapper functions that mainly re-produces some of the
8-
sequence plots rendered with TraMineR::seqplot() and 'TraMineRextras'.
9-
Whereas 'TraMineR' uses base R to produce the plots this library draws on
10-
'ggplot2'. The plots are produced on the basis of a sequence object defined
7+
Description: A set of wrapper functions that mainly re-produces most of the
8+
sequence plots rendered with TraMineR::seqplot(). Whereas 'TraMineR' uses base
9+
R to produce the plots this library draws on 'ggplot2'.
10+
The plots are produced on the basis of a sequence object defined
1111
with TraMineR::seqdef(). The package automates the reshaping and plotting
1212
of sequence data. Resulting plots are of class 'ggplot', i.e. components
1313
can be added and tweaked using '+' and regular 'ggplot2' functions.
1414
URL: https://maraab23.github.io/ggseqplot/,
1515
https://github.com/maraab23/ggseqplot
1616
BugReports: https://github.com/maraab23/ggseqplot/issues
17-
Depends: R (>= 4.1.0), TraMineR (>= 2.2-5)
17+
Depends: R (>= 4.1.0)
1818
License: GPL (>= 3)
1919
Encoding: UTF-8
2020
RoxygenNote: 7.2.1
2121
RdMacros: Rdpack
2222
Imports: colorspace, dplyr, forcats, ggh4x, ggplot2, ggrepel, ggtext,
23-
glue, patchwork, purrr, Rdpack, tidyr, usethis
23+
glue, patchwork, purrr, Rdpack, tidyr, TraMineR (>= 2.2-5),
24+
usethis
2425
Suggests: covr, ggthemes, hrbrthemes, knitr, rmarkdown, testthat (>=
25-
3.0.0), TraMineRextras
26+
3.0.0)
2627
VignetteBuilder: knitr
2728
Config/testthat/edition: 3
2829
NeedsCompilation: no
29-
Packaged: 2022-09-07 19:45:48 UTC; ba3gh6
30+
Packaged: 2022-10-11 09:58:49 UTC; ba3gh6
3031
Author: Marcel Raab [aut, cre] (<https://orcid.org/0000-0002-3097-1591>)
3132
Maintainer: Marcel Raab <marcel.raab@gmail.com>
3233
Repository: CRAN
33-
Date/Publication: 2022-09-07 20:00:02 UTC
34+
Date/Publication: 2022-10-11 10:32:33 UTC

MD5

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
a73605b45c0ef96bbe15c8003350b1f5 *DESCRIPTION
1+
9f793cacbb26e74abd6552f07f465025 *DESCRIPTION
22
3a225b00b6b454cd7cc9982a22de5792 *NAMESPACE
3-
a1aa77054e7ab5cfb48bf8a6209d47b3 *NEWS.md
4-
cb3ad8305001ff158eb534634183890f *R/ggseqdplot.R
5-
5718499a91eade80422d1e040e84bbef *R/ggseqeplot.R
6-
392e407163d9e99645ee4d88d5415bfe *R/ggseqfplot.R
7-
4360337f6a6060ed5d31aa8b4af58582 *R/ggseqiplot.R
8-
c226da4f73415c37e164b056696d84af *R/ggseqmsplot.R
9-
3e5f0fc7fc8e9584a4b22062a1bb6e64 *R/ggseqmtplot.R
3+
31c5e6f7df7c7dbc4ddcdb25895fe259 *NEWS.md
4+
355695c5db7de1a8d7fbd2831553b8e2 *R/ggseqdplot.R
5+
0d41f3bb70d0170fb924842bed91741a *R/ggseqeplot.R
6+
644a2db1a57b7f7e3c2ef9abf958ab6c *R/ggseqfplot.R
7+
58053a1e07e548fedc31a2a8d8a1d080 *R/ggseqiplot.R
8+
996f614af557f14afc9e61833e08d459 *R/ggseqmsplot.R
9+
f767487a8f3d26ec469fdf7b3e31e97d *R/ggseqmtplot.R
1010
bee42aca8ac767a7de5732c8ff83eb97 *R/ggseqplot-package.R
11-
029fa7baba56aa1b5ddc072caa1e6d08 *R/ggseqrfplot.R
12-
11f8fa534ab078289d74774b3edd619b *R/ggseqrplot.R
13-
97c9aa77dc147159e8d3cb17af76acc0 *R/ggseqtrplot.R
11+
10c0581fdd36b5480d6de93772fb908f *R/ggseqrfplot.R
12+
234cf07c88e955b5ba47409ba5f2ff40 *R/ggseqrplot.R
13+
1677c4c5f8054d10f3ea3782321728ff *R/ggseqtrplot.R
1414
f3590a408dfcd78fcc58db1bd0574593 *R/internal_helpers.R
15-
655a94ea4bd67eda129b5520fb603e95 *R/zzz.R
16-
b594f437bd9788b2b686b2f3d23ebd6c *README.md
17-
349b7a4af047f94ca891988ac1fd50d9 *build/partial.rdb
15+
758a9bb682b1f55a5c188f2399245747 *R/zzz.R
16+
c8964244610ec8c6b6e17fd4fea268c7 *README.md
17+
ce38627d4a38a00cce7c1ce6c1185740 *build/partial.rdb
1818
3f4888d915d1e61bd3e4b47e46f5794b *build/vignette.rds
1919
e8c9fc7adf4763c9fb311e84c0480ad9 *inst/CITATION
2020
d975bd9930cfa30644934bb7359e30ba *inst/REFERENCES.bib
21-
f0f11a7c6f39f3a055312b48313487cf *inst/doc/ggseqplot.R
22-
38700f90d7b71ff7b906bc2eff81f5dd *inst/doc/ggseqplot.Rmd
23-
d0063786bc1e5397155e265c313e47c7 *inst/doc/ggseqplot.html
21+
0581ca6fb324a60879a4719f42ce754c *inst/doc/ggseqplot.R
22+
4dca36d1ecddcb57957ce43a17dd487f *inst/doc/ggseqplot.Rmd
23+
c2a36b34af9b34fcd41b08e30ff973d8 *inst/doc/ggseqplot.html
2424
441fb46be1612086d7ea49567c01fa0f *man/figures/README-ggseqdplot1-1.png
2525
fa6ecb6406f222a8c7f18832fda9ac59 *man/figures/README-ggseqdplot2-1.png
2626
2b4ccbde4e94508ecb42516330971d2d *man/figures/README-ggseqeplot1-1.png
@@ -36,26 +36,27 @@ e4bdee6ea6dc7db8b9c8e58043b8e5bc *man/figures/README-seqiplot2-1.png
3636
e4110e018e5be64b02a72c36eaad72c5 *man/figures/README-seqiplot3-1.png
3737
0e555a91e15ff18516b7f9bf2410f950 *man/figures/README-seqplot.rf1-1.png
3838
d4852713e6dd16952596233d7cb79262 *man/figures/logo.png
39-
c2a3ef62d374ea4fc7568606780b20ea *man/ggseqdplot.Rd
40-
1085ff80f1f7dcea9d8c2cefb02bc133 *man/ggseqeplot.Rd
41-
d808f979f177c720eeb1aed2f3c9c203 *man/ggseqfplot.Rd
42-
81dd6de92b6e94e420ba633c7be40c79 *man/ggseqiplot.Rd
43-
077694c4d057cf51ec5b291dd18abe81 *man/ggseqmsplot.Rd
44-
6a181ad240812d397661f1fe909e2944 *man/ggseqmtplot.Rd
45-
1bc50da44f62118718fe03a33ebe14c4 *man/ggseqplot-package.Rd
46-
cc902a8d8c3cf46e4c4f2c3c3f4df21d *man/ggseqrfplot.Rd
47-
8ddf7a89226f825e032aefabe592ff2c *man/ggseqrplot.Rd
48-
51b9fa5e7d5779fdc24ff6e239c0ef99 *man/ggseqtrplot.Rd
39+
b9274dfdfdecfbd570f7327b6fc0dca0 *man/ggseqdplot.Rd
40+
9e44b439f7c6e0a4440e5f1d03fbf3d5 *man/ggseqeplot.Rd
41+
4f5918af38c348e4b77acd9dc99929d5 *man/ggseqfplot.Rd
42+
541f306580ee3f46c484b861517146fb *man/ggseqiplot.Rd
43+
0461e17bb1624439fd755efdd53fe4e8 *man/ggseqmsplot.Rd
44+
ab9df37d2cc134e68e305446d1ba04f7 *man/ggseqmtplot.Rd
45+
175c60be86072261cff04c2814a5957d *man/ggseqplot-package.Rd
46+
5b16836ee5c89cc6b7a18a88ed03c1a0 *man/ggseqrfplot.Rd
47+
b6e41df2ed2744e34e859e80f764c768 *man/ggseqrplot.Rd
48+
534f36d5ab43019d5bb787e81d7f8f8a *man/ggseqtrplot.Rd
4949
3bc2a687a7d1df2f3288d53ad3b62a9e *tests/testthat.R
50-
b5d90965b80d859637ca94f31f99f807 *tests/testthat/test-ggseqdplot.R
51-
6bb16ff9ced511073eaca921fbabcc69 *tests/testthat/test-ggseqeplot.R
52-
65cab8175cc36f6d5ed0a50b634fbc66 *tests/testthat/test-ggseqfplot.R
53-
82e416b70167aaf609843b6f904c81fc *tests/testthat/test-ggseqiplot.R
54-
da195e84dca3b9bd4f7512f5d2bd0ca7 *tests/testthat/test-ggseqmsplot.R
55-
c8df0c866c725b36bd0de8c52cc7f01d *tests/testthat/test-ggseqmtplot.R
56-
7c1f59253b80c36adba331d2f9efdcce *tests/testthat/test-ggseqrfplot.R
57-
e160b0a4ee91add24d54b7d714a940c1 *tests/testthat/test-ggseqrplot.R
58-
8dfbc6ca4919157149176121a8edfa86 *tests/testthat/test-ggseqtrplot.R
50+
0e6d216e4c32c05c2052f4e9c8cd84bc *tests/testthat/test-ggseqdplot.R
51+
33bdb36141ee40ed0e424552b948115c *tests/testthat/test-ggseqeplot.R
52+
b22c2d5586ffccd1c1d4bbf91eec3ecc *tests/testthat/test-ggseqfplot.R
53+
4ea8ba616f00ce90fbaeb2169c92038f *tests/testthat/test-ggseqiplot.R
54+
9d34ed07d284c1afb7ba816fc0f1833f *tests/testthat/test-ggseqmsplot.R
55+
e05e27256db2f56f50ed52cefc570f38 *tests/testthat/test-ggseqmtplot.R
56+
a568b1cad477ce67178d2669f1c76842 *tests/testthat/test-ggseqrfplot.R
57+
0f459b5e95d0d4ec711111d3445fb088 *tests/testthat/test-ggseqrplot.R
58+
6ceba1964e4a1221c6efdc3c57c632e6 *tests/testthat/test-ggseqtrplot.R
5959
a4b5f30fd19f2de28f0cd30c893efbf2 *tests/testthat/test-internal_helper.R
60-
38700f90d7b71ff7b906bc2eff81f5dd *vignettes/ggseqplot.Rmd
60+
3163a0d1c73e1c77762ce0fea5020b02 *vignettes/apa.csl
61+
4dca36d1ecddcb57957ce43a17dd487f *vignettes/ggseqplot.Rmd
6162
f5dd7b005604e4fad4ba0d642598e54c *vignettes/references.bib

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# ggseqplot 0.8.1
2+
3+
* reverted TraMiner to Import
4+
* removed unnecessary Suggests from TraMineRextras
5+
* revised vignette, tests, and documentation accordingly
6+
* harmonized example code
7+
18
# ggseqplot 0.8.0
29

310
* complete revision of `ggseqrfplot` after `{TraMineR}` release 2.2-5

R/ggseqdplot.R

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,10 @@
6363
#' \insertAllCited{}
6464
#'
6565
#' @examples
66-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67-
#'
68-
#' # Examples from TraMineR::seqplot
66+
#' # Use examples from TraMineR & load ggplot for fine-tuning the plot
67+
#' library(TraMineR)
6968
#' library(ggplot2)
7069
#'
71-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72-
#'
73-
#' # Examples from TraMineR::seqplot
74-
#'
7570
#' # actcal data set
7671
#' data(actcal)
7772
#'
@@ -81,8 +76,6 @@
8176
#' actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
8277
#' actcal.seq <- seqdef(actcal, 13:24, labels = actcal.lab)
8378
#'
84-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85-
#'
8679
#' # state distribution plots; grouped by sex
8780
#' # with TraMineR::seqplot
8881
#' seqdplot(actcal.seq, group = actcal$sex)

R/ggseqeplot.R

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#' instead of base R's \code{\link[base]{plot}} function that is used by
66
#' \code{\link[TraMineR:seqplot]{TraMineR::seqplot}} \insertCite{gabadinho2011}{ggseqplot}.
77
#' Other than in \code{\link[TraMineR:seqHtplot]{TraMineR::seqHtplot}} group-specific entropy
8-
#' lines are displayed in a common plot (just like in
9-
#' \code{\link[TraMineRextras:seqplot.tentrop]{TraMineRextras::seqplot.tentrop}}).
8+
#' lines are displayed in a common plot.
109
#'
1110
#' @param seqdata State sequence object (class \code{stslist}) created with the \code{\link[TraMineR:seqdef]{TraMineR::seqdef}} function.
1211
#' @param group If grouping variable is specified plot shows one line for each group
@@ -41,9 +40,8 @@
4140
#' \insertAllCited{}
4241
#'
4342
#' @examples
44-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45-
#'
46-
#' # Examples from TraMineR::seqplot
43+
#' # Use examples from TraMineR
44+
#' library('TraMineR')
4745
#'
4846
#' # actcal data set
4947
#' data(actcal)
@@ -54,17 +52,14 @@
5452
#' actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
5553
#' actcal.seq <- seqdef(actcal, 13:24, labels = actcal.lab)
5654
#'
57-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58-
#'
59-
#'
6055
#' # sequences sorted by age in 2000 and grouped by sex
6156
#' # with TraMineR::seqplot (entropies shown in two separate plots)
6257
#' seqHtplot(actcal.seq, group = actcal$sex)
6358
#' # with ggseqplot (entropies shown in one plot)
6459
#' ggseqeplot(actcal.seq, group = actcal$sex)
6560
#' ggseqeplot(actcal.seq, group = actcal$sex, gr.linetype = TRUE)
6661
#'
67-
#' #manual color specification
62+
#' # manual color specification
6863
#' ggseqeplot(actcal.seq, linecolor = "darkgreen")
6964
#' ggseqeplot(actcal.seq, group = actcal$sex,
7065
#' linecolor = c("#3D98D3FF", "#FF363CFF"))

R/ggseqfplot.R

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,10 @@
4747
#' \code{\link[ggseqplot:ggseqiplot]{ggseqiplot}}
4848
#'
4949
#' @examples
50-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51-
#'
52-
#' # Examples from TraMineR::seqplot
53-
#'
50+
#' # Use examples from TraMineR & load ggplot for fine-tuning the plot
51+
#' library(TraMineR)
5452
#' library(ggplot2)
5553
#'
56-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57-
#'
58-
#' # Examples from TraMineR::seqplot
59-
#'
6054
#' # actcal data set
6155
#' data(actcal)
6256
#'
@@ -66,8 +60,6 @@
6660
#' actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
6761
#' actcal.seq <- seqdef(actcal, 13:24, labels = actcal.lab)
6862
#'
69-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70-
#'
7163
#' # sequence frequency plot
7264
#' # with TraMineR::seqplot
7365
#' seqfplot(actcal.seq)

R/ggseqiplot.R

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@
7070
#' \insertAllCited{}
7171
#'
7272
#' @examples
73-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74-
#'
75-
#' # Examples from TraMineR::seqplot
73+
#' # Use examples from TraMineR
74+
#' library(TraMineR)
7675
#'
7776
#' # actcal data set
7877
#' data(actcal)
@@ -87,9 +86,6 @@
8786
#' data(ex1)
8887
#' ex1.seq <- seqdef(ex1, 1:13, weights = ex1$weights)
8988
#'
90-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91-
#'
92-
#'
9389
#' # sequences sorted by age in 2000 and grouped by sex
9490
#' # with TraMineR::seqplot
9591
#' seqIplot(actcal.seq, group = actcal$sex, sortv = actcal$age00)

R/ggseqmsplot.R

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,8 @@
3535
#' \insertAllCited{}
3636
#'
3737
#' @examples
38-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39-
#'
40-
#' # Examples from TraMineR::seqplot
41-
#'
42-
#' library(ggplot2)
43-
#'
44-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45-
#'
46-
#' # Examples from TraMineR::seqplot
38+
#' # Use examples from TraMineR
39+
#' library(TraMineR)
4740
#'
4841
#' # actcal data set
4942
#' data(actcal)
@@ -54,8 +47,6 @@
5447
#' actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
5548
#' actcal.seq <- seqdef(actcal, 13:24, labels = actcal.lab)
5649
#'
57-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58-
#'
5950
#' # modal state sequence plot; grouped by sex
6051
#' # with TraMineR::seqplot
6152
#' seqmsplot(actcal.seq, group = actcal$sex)

R/ggseqmtplot.R

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,10 @@
4545
#' \insertAllCited{}
4646
#'
4747
#' @examples
48-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49-
#'
50-
#' # Examples from TraMineR::seqplot
51-
#'
48+
#' # Use examples from TraMineR & load ggplot for fine-tuning the plot
49+
#' library(TraMineR)
5250
#' library(ggplot2)
5351
#'
54-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55-
#'
56-
#' # Examples from TraMineR::seqplot
57-
#'
5852
#' # actcal data set
5953
#' data(actcal)
6054
#'
@@ -64,8 +58,6 @@
6458
#' actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
6559
#' actcal.seq <- seqdef(actcal, 13:24, labels = actcal.lab)
6660
#'
67-
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68-
#'
6961
#' # modal state sequence plot; grouped by sex
7062
#' # with TraMineR::seqplot
7163
#' seqmtplot(actcal.seq, group = actcal$sex)

R/ggseqrfplot.R

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,47 +103,48 @@
103103
#' \insertAllCited{}
104104
#'
105105
#' @examples
106-
#' ## Load additional libraries
106+
#' # Use examples from TraMineR & load additional libraries for fine-tuning the plots
107+
#' library(TraMineR)
107108
#' library(patchwork)
108109
#' library(ggplot2)
109110
#'
110-
#' ## From TraMineR::seqprf
111-
#' ## Defining a sequence object with the data in columns 10 to 25
112-
#' ## (family status from age 15 to 30) in the biofam data set
111+
#' # From TraMineR::seqprf
112+
#' # Defining a sequence object with the data in columns 10 to 25
113+
#' # (family status from age 15 to 30) in the biofam data set
113114
#' data(biofam)
114115
#' biofam.lab <- c("Parent", "Left", "Married", "Left+Marr",
115116
#' "Child", "Left+Child", "Left+Marr+Child", "Divorced")
116117
#'
117-
#' ## Here, we use only 100 cases selected such that all elements
118-
#' ## of the alphabet be present.
119-
#' ## (More cases and a larger k would be necessary to get a meaningful example.)
118+
#' # Here, we use only 100 cases selected such that all elements
119+
#' # of the alphabet be present.
120+
#' # (More cases and a larger k would be necessary to get a meaningful example.)
120121
#' biofam.seq <- seqdef(biofam[501:600, 10:25], labels=biofam.lab,
121122
#' weights=biofam[501:600,"wp00tbgs"])
122123
#' diss <- seqdist(biofam.seq, method = "LCS")
123124
#'
124125
#'
125-
#' ## Using 12 groups and default MDS sorting
126-
#' ## and original method by Fasang and Liao (2014)
126+
#' # Using 12 groups and default MDS sorting
127+
#' # and original method by Fasang and Liao (2014)
127128
#'
128-
#' ## ... with TraMineR::seqrfplot (weights have to be turned off)
129+
#' # ... with TraMineR::seqrfplot (weights have to be turned off)
129130
#' seqrfplot(biofam.seq, weighted = FALSE, diss = diss, k = 12,
130131
#' grp.meth="first", which.plot = "both")
131132
#'
132-
#' ## ... with ggseqrfplot
133-
#' ggseqrfplot(biofam.seq, weighted = FALSE, diss = diss, k = 12)
133+
#' # ... with ggseqrfplot
134+
#' ggseqrfplot(biofam.seq, weighted = FALSE, diss = diss, k = 12, grp.meth="first")
134135
#'
135-
#'## With a user specified sorting variable
136-
#'## Here time spent in parental home, which has ties
137-
#'parentTime <- seqistatd(biofam.seq)[, 1]
138-
#'b.srf <- seqrf(biofam.seq, diss=diss, k=12, sortv=parentTime)
136+
#' # With a user specified sorting variable
137+
#' # Here time spent in parental home, which has ties
138+
#' parentTime <- seqistatd(biofam.seq)[, 1]
139+
#' b.srf <- seqrf(biofam.seq, diss=diss, k=12, sortv=parentTime)
139140
#'
140-
#'## ... with TraMineR
141-
#'plot(b.srf, which.plot="both")
141+
#' # ... with TraMineR
142+
#' plot(b.srf, which.plot="both")
142143
#'
143-
#'## ... with ggseqrfplot (and some extra annotation using patchwork)
144-
#'ggseqrfplot(seqrfobject = b.srf) +
145-
#' plot_annotation(title = "Sorted by time spent in parental home",
146-
#' theme = theme(plot.title = element_text(hjust = 0.5, size = 18)))
144+
#' # ... with ggseqrfplot (and some extra annotation using patchwork)
145+
#' ggseqrfplot(seqrfobject = b.srf) +
146+
#' plot_annotation(title = "Sorted by time spent in parental home",
147+
#' theme = theme(plot.title = element_text(hjust = 0.5, size = 18)))
147148
ggseqrfplot <- function(seqdata = NULL,
148149
diss = NULL,
149150
k = NULL,

0 commit comments

Comments
 (0)