Skip to content

tidysynth

A Tidy Implementation of the Synthetic Control Method

v0.2.1 · Mar 23, 2025 · MIT + file LICENSE

Description

A synthetic control offers a way of evaluating the effect of an intervention in comparative case studies. The package makes a number of improvements when implementing the method in R. These improvements allow users to inspect, visualize, and tune the synthetic control more easily. A key benefit of a tidy implementation is that the entire preparation process for building the synthetic control can be accomplished in a single pipe.

Downloads

CRAN

840

Last 30 days

3993rd

3.1K

Last 90 days

13.2K

Last year

Trend: -17.4% (30d vs prior 30d)

r2u CRAN

8

Last 30 days

38

Last 90 days

115

Last year

Trend: -42.9% (30d vs prior 30d)

autoCRAN

7

Last 7 days

17

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code intelligence has not been computed for this package yet.

Code

Structure

Lines of code

5,513

Files

41

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,848 (51.7%)Tests 840 (15.2%)Docs 1,825 (33.1%)

API

Exported functions

18

Internal functions

3

Recent export changes

v0.2.0+1 grab_significance  −1 grab_signficance
v0.1.0+18 %>%, generate_control, generate_predictor +15 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.29

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

94.1%

Roxygen coverage

94.4%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.5.0

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

3

First release

2021-01-27

Latest release

2025-03-24

Avg cadence

759 days

Cold removal rate

100%

Dep drift

1

LOC over versions

v0.1.0: 5,492 LOCv0.2.0: 5,531 LOCv0.2.1: 5,513 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies magrittr tibble dplyr ggplot2 tidyr forcats rlang kernlab rgenoud optimx tidysynth

Version History

4 tracked
new 0.2.1 Mar 10, 2026
updated 0.2.1 ← 0.2.0 diff Mar 23, 2025
updated 0.2.0 ← 0.1.0 diff May 20, 2023
new 0.1.0 Jan 26, 2021