Skip to content

scplot

0.7.0Package record

Plot Function for Single-Case Data Frames

0packages dependsuggested by 1
6.4Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Add-on for the 'scan' package that creates plots from single-case data frames ('scdf'). It includes functions for styling single-case plots, adding phase-based lines to indicate various statistical parameters, and predefined themes for presentations and publications. More information and in depth examples can be found in the online book "Analyzing Single-Case Data with R and 'scan" Jürgen Wilbert (2026) https://jazznbass.github.io/scan-Book/.

Changes in 0.7.0

Bug fixes

  • Fixed bug that did not allow to set pvar to something else than "phase" and add a statline at the same time.

New function

  • split_dataline(): This function allows to split the dataline of a treatment phase into two parts based on a treatment variable in a dataset. This is mainly used to visualize alternating treatments in a phase (e.g. alternating treatments in a B phase).

```r

scplot(scan::example_atd) |>

split_dataline("treatment")

```

New features / arguments

  • set_dataline(): new argument "show_gaps". Logical. If TRUE, missing values in the data will result in gaps in the line. If FALSE, missing values will be ignored and the line will be drawn continuously.
  • Improved the automatic naming of statlines when the phase argument is set. (e.g. "mean", phase = "A" now creates a statline with the name "mean values A").
  • Themes that have been created with *scplot* prior version 0.6.2 (including 0.6.1) must be recreated by executing the respective functions due to the adoption to S7 classes.
Show all changes in 0.7.0Hide the rest of the changes in 0.7.0
  • add_statline(): trends can now be plotted for any phase or phase combination.
  • add_statline(): Four regression methods now apply to all trend settings.
  • add_stalline(): phase = "all" calculates a statistic for all values.
  • New argument segmented for add_statline to indicate if there is a gap in the statline between phases.
  • New argument case specifying for which cases a statline should be added.
  • New experimental option to include staircase style phase separators that go across plots

```

scplot(exampleA1B1A2B2) |>

scplot::set_theme("basic", "tiny", "staircase") |>

set_yaxis(c(NA,50))

scplot(exampleABC) |>

set_separator(staircase = TRUE, linewidth = 2, linetype = "solid")

```

Multiple new themes:

'clarity', 'journal', 'poster', 'handout', 'sparse','midnight', 'playful', 'atelier', 'bauhaus', 'sienna'

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-09
Show 2 earlier changesHide 2 earlier changes
  • WARNING12 OK, 1 WARNING2026-05-06
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.7.0
READMEYes · 149 wordsVignettesNoNEWSYes · 100% structured · mentions 0.7.0Citation fileYes · software entry onlyWebsitenot declared in DESCRIPTION
Help pages
39 (10 internal)includes a package overview page
Examples that run
93%13 run in a plain check · 1 never run
Exported functions with examples
42%
Documented parameters
97%
Return-value docs
92%
Help pages citing references
0%

Downloads

6.4K
CRAN downloads in the past year
Rank #4,878 · ~18/day · ~537/mo
Daily download trend is not available in this view yet.
76530 days
1.7K90 days
6.4K1 year
Compare downloads with other packages →
Also on91 r2u6 autocran

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing scplot adds 121 packages (60 with compiled code, 99 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, bslib 5.6 MB.

Depends (1)
R >= 4.1.0
Imports (7)
ggplot2gridscanstatsutilsrlangcli
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.3.0 (2023)
Releases (9)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.7.0Latest
    record
    2026-03-29 · current release · diff ↗ ·
    added 1 export
    split_dataline
  • 0.6.1
    record
    2026-02-25 · diff ↗ ·
    removed 1 export
    %>%
  • 0.6.0
    record
    2025-06-29 · diff ↗ ·
    added 1 export
    scplot_rand
  • R
    R 4.5.0 released · 2025-04-11
  • 0.5.1
    record
    2025-03-01 · diff ↗
  • 0.5.0
    record
    2025-02-05 · diff ↗
  • 0.4.0
    record
    2024-06-30 · diff ↗ ·
    added 1 export
    add_line
  • R
    R 4.4.0 released · 2024-04-24
  • 0.3.3
    record
    2023-06-03 · diff ↗ ·
    added 5 exports
    %>%, element_line, element_rect, element_text, unit
  • 0.3.1
    record
    2023-05-08 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.3.0
    record
    2023-03-21
  • R
    R 4.2.0 released · 2022-04-22

Package metadata

First published
2023-03-21
Total releases
9 / 3 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.1.0
Download size
79 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("scplot")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for scplot version 0.7.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy