Skip to content

styler

1.11.0Package record

Non-Invasive Pretty Printing of R Code

14packages dependsuggested by 50
746.9Kdownloads / year
91.7%test coverage
12/13flavors OK

Overview

About

Pretty-prints R code without changing the user's formatting intent.

Changes in 1.11.0

This release fixes a bug related that prevented {styler} to format code with

comments in curly-curly expressions {{ (#1269).

@IndrajeetPatil is now a package

author. Thanks for your many contributions.

**New features**

  • Add support for {webr} code chunks in Rmd/qmd documents (#1229).
  • Add colored output to R API (#1187).

**Major changes**

  • Ensure {styler} can format code with comment in curly-curly (#1269).
  • Adapt to single indent semantics in style guide (#1235).
  • Remove excessive line breaks between top-level expressions (#1239).
  • Remove blank lines after opening and before closing braces (#1995).
Show all changes in 1.11.0Hide the rest of the changes in 1.11.0
  • Empty curly have no spaces around (#1234).
  • Remove spaces around dollar operator (#1246).
  • Improve stack trace styler throws on parse error (#1216).
  • Use Bootstrap 5 template for pkgdown website (#1209).
  • Complete third-party style guide documentation (#1201).
  • Document package options (#1193).
  • Bump minimum needed R version to 4.0 (#1197).

**Minor changes**

  • Ensure formatted token is a call before forcing line breaks (#1254).
  • Fix lints (#1260), update .lintr file.
  • Use all_linters() instead of using tags (#1207).
  • Fix paste_linter() lints (#1204).
  • Turn off strings_as_factors_linter() (#1217).
  • Update precommit config (#1205).
  • Remove unused extend_if_comment() internal (#1250).
  • Remove unused internal utility: calls_sys() (#1213).
  • Remove unused testing helper: generate_test_samples() (#1212).
  • Improve a few function names (#1249).
  • Use expect_no_warning() (#1248).
  • Update WORDLIST (#1240, #1210).
  • Check for warnings in examples and tests (#1219).
  • Use stable version of {purrr} (#1215).
  • Don't store code tree structures in tests (#1208).
  • Update touchstone config (#1203).
  • Add non-US locale and use pak to upgrade packages in GHA (#1200).
  • Welcome Indrajeet as author (#1198).

Thanks for everyone who contributed to this release:

@armenic,

@bernt-matthias,

@cicdguy,

@elgabbas,

@fh-mthomson,

@IndrajeetPatil,

@kevinushey,

@kongdd,

@krlmlr,

@lorenzwalthert,

@maikol-solis,

@MichaelChirico,

@nickhir,

@obsaditelnost,

@olivroy,

@rinkjames,

@SamGG,

@stibu81,

@strengejacke,

@wiper8, and

@wurli.

From NEWS.md in the release

Install

Health

CRAN checks
1ERROR12OK
Check messages
ERRORtestsr-release-windows-x86_64
Running 'testthat.R' [38s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(styler)
  > test_check("styler") # checks multiple files, in parallel
  Starting 2 test processes.
  > test-curly-curly.R: mixed-in.R was identical to mixed-out.R
  > test-detect-alignment.R: cols-with-one-row-in.R was identical to cols-with-one-row-out.R
  > test-detect-alignment.R: fun-decs-in.R was identical to fun-decs-out.R
  > test-detect-alignment.R: named-in.R was identical to named-out.R
  > test-detect-alignment.R: one-col-some-named-in.R was identical to one-col-some-named-out.R
  > test-detect-alignment.R: quoted-names-in.R was identical to quoted-names-out.R
  > test-detect-alignment.R: tribble-in.R was identical to tribble-out.R
  > test-detect-alignment.R: tribble-three-cols-in.R was identical to tribble-three-cols-out.R
  > test-escaping.R: basic-escape-in.R was identical to basic-escape-out.R
  > test-fun_dec.R: fun_dec_scope_spaces-in.R was ide
...[truncated]...
code -1073741819
  Backtrace:
       ▆
    1. └─testthat::test_check("styler")
    2.   └─testthat::test_dir(...)
    3.     └─testthat:::test_files(...)
    4.       └─testthat:::test_files_parallel(...)
    5.         ├─withr::with_dir(...)
    6.         │ └─base::force(code)
    7.         ├─testthat::with_reporter(...)
    8.         │ └─base::tryCatch(...)
    9.         │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10.         │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.         │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12.         └─testthat:::parallel_event_loop_chunky(queue, reporters, ".")
   13.           └─queue$poll(Inf)
   14.             └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─cli::cli_abort(...)
   18.                     └─rlang::abort(...)
  Execution halted

CRAN check page ↗

Slowest check: 4.3 min · r-oldrel-windows-x86_64
Status changes
  • ERROR12 OK, 1 ERROR2026-10-20
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-07
Show 1 earlier changeHide 1 earlier change
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.11.0
READMEYes · 157 wordsVignettesYes · 8 · dynamicNEWSYes · 100% structured · mentions 1.11.0Citation fileNoWebsiteYes · pkgdown
Help pages
209 (187 internal)includes a package overview page
Examples that run
94%44 run in a plain check (5 of them under a condition) · 2 never run · 1 hold no code
Exported functions with examples
82%
Documented parameters
92%
Return-value docs
6%
Help pages citing references
0%

Downloads

746.9K
CRAN downloads in the past year
Rank #492 · ~2K/day · ~62.2K/mo
Daily download trend is not available in this view yet.
53.2K30 days
151.1K90 days
746.9K1 year
Compare downloads with other packages →
Also on20.3K r2u9 autocran58K conda_forge282 c2d4u

Repository

r-lib/styler ↗Organization: r-lib
775Stars
74Forks
54Open issues
9Open PRs
23Releases
3,593Commits
31Commit identities
rpretty-print
3,593 commits · Last activity 2026-09-29 · +0.3% stars, 30d · Default branch at 1.11.0.9001, ahead of CRAN 1.11.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
92%
Median days to close, 50 most recently updated closed issues
20
Median days to close, 50 most recently updated closed PRs
4

Stars over time

2025-10-19 · 7602026-09-24 · 775
PracticesBeta

13 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/r-lib/styler 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

Governance and community (1)
Contributing guide
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-29 · The repository has a site deploy workflow

pkgdown site last built 2026-06-10

Coverage (1)
Coverage reporting
Show all practicesHide 4 practices
CRAN release process (1)
cran-comments.md
Automation and maintenance (1)
pre-commit
Lint, format, editor (2)
lintrRStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen on or before 2026-09-20
    Commits: at least 5 crediting it in the message
Review tools
  • Copilot code review
    Commits: at least 1 accepting its review suggestions
From outside contributors
  • Claude Code
    Pull requests: 3 from outside contributors, first on 2026-09-27, 3 from forks
Models named in its commits
  • Claude Opus 55 commits · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
18 external dependencies (excludes base and recommended)

Installing styler adds 14 packages (7 with compiled code, 4.3 MB of source tarballs). Heaviest: vctrs 1.0 MB, rlang 766 KB, cli 629 KB.

Depends (1)
R >= 4.0.0
LinkingTo (0)
none
Enhances (0)
none

People & History

People (3)
Maintainer since 1.0.0 (2017), Author
Author · added in 1.8.0
Releases (24)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.11.0Latest
    record
    2025-10-13 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.10.3
    record
    2024-04-08 · diff ↗
  • 1.10.2
    record
    2023-08-29 · diff ↗
  • 1.10.1
    record
    2023-06-05 · diff ↗
  • 1.10.0
    record
    2023-05-24 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.9.1
    record
    2023-03-05 · diff ↗
  • 1.9.0
    record
    2023-01-15 · diff ↗
  • 1.8.1
    record
    2022-11-08 · diff ↗ ·
    added 14 exports
    compute_parse_data_nested, is_asymmetric_tilde_expr, is_comment, is_conditional_expr, is_curly_expr, is_for_expr, is_function_call, is_function_declaration, is_symmetric_tilde_expr, is_tilde_expr, is_while_expr, next_non_comment, previous_non_comment, scope_normalize
  • 1.8.0
    record
    2022-10-23 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.7.0
    record
    2022-03-14 · diff ↗
  • 1.6.2
    record
    2021-09-23 · diff ↗
Show 18 earlier eventsHide 18 earlier events

Package metadata

First published
2017-12-11
Total releases
24 / 9 yrs
License
MIT + file LICENSE OSI · relicensed from GPL-3 in 1.4.0
Minimum R
≥ 4.0.0
Download size
422 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("styler")
Walthert, L., Müller, K., & Patil, I. (2025). styler: Non-Invasive Pretty Printing of R Code (Version 1.11.0) [Computer software]. https://doi.org/10.32614/CRAN.package.styler

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

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