Skip to content

Commit

Permalink
Prep CRAN submission
Browse files Browse the repository at this point in the history
  • Loading branch information
maraab23 committed Sep 7, 2022
1 parent 01ad4f7 commit a4f5f21
Show file tree
Hide file tree
Showing 61 changed files with 198 additions and 384 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
3 changes: 0 additions & 3 deletions CRAN-SUBMISSION

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggseqplot
Title: Render Sequence Plots using 'ggplot2'
Version: 0.7.2.9020
Version: 0.8.0
Authors@R:
person("Marcel", "Raab", , "marcel.raab@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-3097-1591"))
Expand All @@ -11,7 +11,7 @@ Description: A set of wrapper functions that mainly re-produces some of the
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.
URL: https://github.com/maraab23/ggseqplot
URL: https://maraab23.github.io/ggseqplot/, https://github.com/maraab23/ggseqplot
BugReports: https://github.com/maraab23/ggseqplot/issues
Depends:
R (>= 4.1.0),
Expand Down
22 changes: 9 additions & 13 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# ggseqplot
# ggseqplot 0.8.0

# ggseqplot 0.7.2.9020 <br><small>(development version)</small>
* complete revision of `ggseqrfplot` after `{TraMineR}` release 2.2-5
(special thanks to Gilbert Ritschard for the support)

* added `{TraMineR}` as dependency

* complete revision of ggseqrfplot after TraMineR release 2.2-5
* added TraMineR as dependency
* tests still need to be updated

# ggseqplot 0.7.2.9001 <br><small>(development version)</small>

* the group argument now respects order of grouping variable when rendering faceted plots
* updated tests
* the group argument now respects order of grouping variable when rendering faceted plots
(issue raised bv Lucille Mattijssen)

# ggseqplot 0.7.2

* fixed sorting issue for y-axis labels in grouped iplots
* allow for additional facet_wrap arguments to change plot appearance

* allow for additional `facet_wrap` arguments to change plot appearance

# ggseqplot 0.7.1

Expand All @@ -24,8 +22,6 @@

* Added option to break down dplots by state (`dissect`)

# ggseqplot 0.6.2.9000 <br><small>(development version)</small>

* Set minimum R version because of R's new pipe (#1, @cbrueffer)

# ggseqplot 0.6.2
Expand Down
2 changes: 0 additions & 2 deletions R/ggseqdplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#' library(ggplot2)
#'
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 0 additions & 3 deletions R/ggseqeplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#' library(ggplot2)
#'
#' # actcal data set
#' data(actcal)
#'
Expand Down
1 change: 0 additions & 1 deletion R/ggseqfplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#' library(ggplot2)
#'
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 0 additions & 2 deletions R/ggseqiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#'
#' # actcal data set
#' data(actcal)
#'
Expand Down
1 change: 0 additions & 1 deletion R/ggseqmsplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#' library(ggplot2)
#'
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
1 change: 0 additions & 1 deletion R/ggseqmtplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#' library(ggplot2)
#'
#' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
28 changes: 20 additions & 8 deletions R/ggseqrfplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
#' At this point \code{ggseqrfplot} does not support a grouping option. For
#' plotting multiple groups, I recommend to produce group specific seqrfobjects or
#' plots and to arrange them in a common plot using \code{\link[patchwork]{patchwork}}.
#'
#' See Example 6 in the vignette for further details:
#' \code{vignette("ggseqplot", package = "ggseqplot")}
#'
#' @return A relative frequency sequence plot using \code{\link[ggplot2]{ggplot}}.
#' @export
Expand All @@ -102,11 +103,11 @@
#' \insertAllCited{}
#'
#' @examples
#' ## From TraMineR::seqprf
#' library(TraMineR)
#' ## Load additional libraries
#' library(patchwork)
#' library(ggplot2)
#'
#' ## From TraMineR::seqprf
#' ## Defining a sequence object with the data in columns 10 to 25
#' ## (family status from age 15 to 30) in the biofam data set
#' data(biofam)
Expand Down Expand Up @@ -178,29 +179,40 @@ ggseqrfplot <- function(seqdata = NULL,
)
}

if (!is.null(seqdata) & !inherits(seqdata, "stslist") & !inherits(seqdata, "seqrf") & inherits(seqrfobject, "seqrf")) {
usethis::ui_info(
"you specified {usethis::ui_code('seqdata')} which are not stored as sequence object
and a valid {usethis::ui_code('seqrfobject')}; the {usethis::ui_code('seqdata')};
as well as the potentially specified parameters
{usethis::ui_code(c('k', 'sortv', 'weighted', 'grp.meth', 'squared', 'pow'))}
will be ignored; the plot will be rendered for the {usethis::ui_field('seqrfobject')}"
)
}

if (inherits(seqdata, "stslist") & !is.null(seqrfobject) & !inherits(seqrfobject, "seqrf")) {
usethis::ui_info(
"you specified a {usethis::ui_code('seqrfobject')} & {usethis::ui_code('seqdata')};
"you specified a {usethis::ui_code('seqrfobject')} & {usethis::ui_code('seqdata')};
the {usethis::ui_code('seqrfobject')} is not of class {usethis::ui_code('seqrf')} and will be ignored;
the plot will be rendered for the {usethis::ui_field('seqdata')} if the other parameters are specified correctly"
)
}

if (!is.null(seqdata) & !inherits(seqdata, "stslist") & !inherits(seqdata, "seqrf")) {
if (!is.null(seqdata) & !inherits(seqdata, "stslist") & !inherits(seqdata, "seqrf") & !inherits(seqrfobject, "seqrf")) {
stop(
"you specified seqdata which are not stored as sequence object;
use 'TraMineR::seqdef' to create a sequence object of class 'stslist')"
"you specified seqdata which are not stored as sequence object and no valid seqrfobject;
use 'TraMineR::seqdef' to create a sequence object of class 'stslist' or specify a valid seqrfobject)"
)
}


if (!is.null(seqdata) & !inherits(seqdata, "stslist") & inherits(seqdata, "seqrf")) {
stop(
"you specified seqdata which are of class 'seqrf';
probably you forgot to type 'seqrfobject = '"
)
}

if (is.null(seqrfobject) & !is.null(seqdata) & !inherits(seqdata, "stslist")) {
if (is.null(seqrfobject) & (is.null(seqdata) | !inherits(seqdata, "stslist"))) {
stop(
"no seqrfobject specified & seqdata are either not specified or not
stored as sequence object; use 'TraMineR::seqdef' to create one"
Expand Down
1 change: 0 additions & 1 deletion R/ggseqrplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#' \insertAllCited{}
#'
#' @examples
#' library(TraMineR)
#' ## Defining a sequence object with the data in columns 10 to 25
#' ## (family status from age 15 to 30) in the biofam data set
#' data(biofam)
Expand Down
2 changes: 0 additions & 2 deletions R/ggseqtrplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
#'
#' # Examples from TraMineR::seqplot
#'
#' library(TraMineR)
#'
#' # biofam data set
#' data(biofam)
#' # We use only a sample of 300 cases
Expand Down
148 changes: 0 additions & 148 deletions R/rfplot.R

This file was deleted.

Loading

0 comments on commit a4f5f21

Please sign in to comment.