Skip to content

switchcase

0.1.1Package record

A Simple and Flexible Switch-Case Construct for the 'R' Language

0packages depend
1.7Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

Provides a switch-case construct for 'R', as it is known from other programming languages. It allows to test multiple, similar conditions in an efficient, easy-to-read manner, so nested if-else constructs can be avoided. The switch-case construct is designed as an 'R' function that allows to return values depending on which condition is met and lets the programmer flexibly decide whether or not to leave the switch-case construct after a case block has been executed.

Changes in 0.1.1

Bug fix

  • Problem with character vectors in test expressions solved.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 40 s · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.1.1
READMEYes · 32 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.1Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
2
Examples that run
100%2 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.7K
CRAN downloads in the past year
Rank #24,842 · ~5/day · ~145/mo
Daily download trend is not available in this view yet.
18830 days
45390 days
1.7K1 year
Compare downloads with other packages →
Also on70 r2u1 autocran

Repository

3Stars
0Forks
1Open issues
1Open PRs
0Releases
14Commits
1Commit identities
switch-case-constructr-packager-languager-lang
14 commits · Last activity 2025-06-20 · Default branch at 0.1.2, ahead of CRAN 0.1.1 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
1,273
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2023-09-10 · 32026-07-07 · 3
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/jsugarelli/switchcase on 2026-10-21.

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Codexfirst seen 2025-06-20
    Pull request it wrote: opened by a project member
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
0 external dependencies (excludes base and recommended)

Installing switchcase adds no packages beyond those that come with R.

Depends (0)
none
Imports (0)
none
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 0.1.0 (2020)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.1Latest
    record
    2020-05-17 · current release · diff ↗
  • 0.1.0
    record
    2020-05-08
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2020-05-08
Total releases
2 / 6 yrs
License
GPL-3 OSI
Download size
4.8 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("switchcase")
Zuckarelli, J. (2020). switchcase: A Simple and Flexible Switch-Case Construct for the 'R' Language (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.switchcase

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

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 switchcase version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, 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