Skip to content

segregation

1.1.0Package record

Entropy-Based Segregation Indices

0packages depend
5.5Kdownloads / year
97.9%test coverage
13/13flavors OK

Overview

About

Computes segregation indices, including the Index of Dissimilarity, as well as the information-theoretic indices developed by Theil (1971) <isbn:978-0471858454>, namely the Mutual Information Index (M) and Theil's Information Index (H). The M, further described by Mora and Ruiz-Castillo (2011) doi:10.1111/j.1467-9531.2011.01237.x and Frankel and Volij (2011) doi:10.1016/j.jet.2010.10.008, is a measure of segregation that is highly decomposable. The package provides tools to decompose the index by units and groups (local segregation), and by within and between terms. The package also provides a method to decompose differences in segregation as described by Elbers (2021) doi:10.1177/0049124121986204. The package includes standard error estimation by bootstrapping, which also corrects for small sample bias. The package also contains functions for visualizing segregation patterns.

Changes in 1.1.0
  • various improvements to compression algorithm
  • add dendrogram visualization
  • allow multiple curves in segcurve function
  • segplot: add optional 'secondary_plot' argument
  • segplot: remove 'title' argument
  • segplot: add optional 'hline' argument

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.0 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-04-10
Show 2 earlier changesHide 2 earlier changes
  • ERROR13 OK, 1 ERROR2026-04-09
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.1.0
READMEYes · 735 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 1.1.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Help pages
23 (1 internal)includes a package overview page
Examples that run
64%7 run in a plain check · 4 never run
Exported functions with examples
58%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
26%

Downloads

5.5K
CRAN downloads in the past year
Rank #9,904 · ~15/day · ~455/mo
Daily download trend is not available in this view yet.
38530 days
99990 days
5.5K1 year
Compare downloads with other packages →
Also on341 r2u3 autocran2.4K conda_forge

Repository

37Stars
3Forks
0Open issues
0Open PRs
9Releases
226Commits
2Commit identities
entropysegregationstatisticsrr-packagerstats
226 commits · Last activity 2025-12-12 · 0% stars, 30d · Default branch at 1.1.0.9000, ahead of CRAN 1.1.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2024-11-17 · 362026-09-02 · 37
PracticesBeta

10 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/elbersb/segregation on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2025-12-12 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Research and citation (1)
CITATION.cff
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
18 external dependencies (excludes base and recommended)

Installing segregation adds 5 packages (4 with compiled code, 7.8 MB of source tarballs). Heaviest: data.table 5.7 MB, Rcpp 1.8 MB, checkmate 247 KB.

Depends (1)
R >= 3.5.0
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.0.1 (2018)
Releases (9)

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
  • 1.1.0Latest
    record
    2023-12-02 · current release · diff ↗
  • 1.0.0
    record
    2023-08-25 · diff ↗ ·
    added 10 exports
    compress, dissimilarity_expected, exposure, get_crosswalk, isolation, merge_units, mutual_total_nested, scree_plot, segcurve, segplot
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.6.0
    record
    2021-09-02 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.5.0
    record
    2021-02-08 · diff ↗ ·
    added 2 exports
    dissimilarity, matrix_to_long
  • 0.4.0
    record
    2021-01-08 · diff ↗ ·
    added 1 export
    mutual_expected
  • R
    R 4.0.0 released · 2020-04-24
  • 0.3.0
    record
    2019-09-20 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.2.0
    record
    2019-01-14 · diff ↗
  • 0.1.0
    record
    2018-06-15 · diff ↗ ·
    added 3 exports
    entropy, ipf, mutual_within
Show 3 earlier eventsHide 3 earlier events
  • R
    R 3.5.0 released · 2018-04-23
  • 0.0.1
    record
    2018-04-17
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2018-04-17
Total releases
9 / 8 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
63 KB / 3 files
Download size
501 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("segregation")

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

It points to 10.1177/0049124121986204.

The repository also keeps a CITATION.cff.

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

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