Skip to content

toolero

0.4.0Package record

A Toolkit for Research Workflows

0packages dependsuggested by 1
2.1Kdownloads / year
86.4%test coverage
13/13flavors OK

Overview

About

Provides utility functions to help researchers implement best practices for their coding projects. Includes tools for reading and cleaning data files, initializing R projects with a standard folder structure and optional YAML configuration, creating 'Quarto' documents from reproducible templates with optional sample data and custom styling, detecting the execution context across interactive, 'Quarto', and script-based workflows, splitting data frames into group-level output files, applying analysis functions to each group with optional parallel execution, and rendering syntactic tree diagrams as standalone PNG images via 'Typst'.

Changes in 0.4.0

New features

  • Added run_by_group(), the apply half of the split-apply workflow. Accepts either a manifest CSV produced by write_by_group(manifest = TRUE) or a named list of data frames. Applies a user-supplied function to each group subset and collects the results into a flat tibble (when the function returns a data frame) or a nested tibble with a list-column (when it returns anything else). Supports parallel execution via furrr and future through the workers argument, with a ceiling at max(1L, parallelly::availableCores() - 1L) to reserve one core for the main session. A seed argument enables reproducible parallel execution for analyses involving randomness.
  • Added read_clean_csv() for reading CSV files into a tibble with janitor::clean_names() applied automatically. Supports explicit missing-value codes via na, selective row dropping via drop_na (accepts TRUE or a character vector of column names), an optional ingest summary via summary, and pass-through arguments to readr::read_csv() via ....
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
  • Added write_clean_csv() for writing data frames to CSV with clean column names. Applies janitor::clean_names() if column names are not already clean and reports affected columns via cli feedback.
  • Added check_project() for auditing a project directory against toolero conventions. Checks for expected folders, an .Rproj file, renv.lock, a git repository, a README, a .gitignore, and hidden files such as .RData or .Rhistory. Operates in two modes: a cli report (default) or a tibble return for programmatic use (error = FALSE).
  • Added qmd_to_r() for extracting R code chunks from any .qmd file into a standalone .R script via knitr::purl(). The output path defaults to the same directory as the input with the extension replaced. The documentation argument controls how much context is preserved in the extracted script.
  • Added generate_project_config() for writing a skeleton YAML project configuration file pre-filled with the standard toolero folder structure. Intended to be edited by the user and passed to init_project() via the new config argument. filename is required and explicit; path defaults to ".". An overwrite argument (default FALSE) guards against accidental replacement of an existing config. The file extension is normalized to .yml regardless of what is supplied.
  • Added Palmer Penguins attribution (Horst, Hill & Gorman, 2020) to the template .qmd, the create_qmd() roxygen @details section, and a provenance note in inst/extdata/.

Breaking changes

  • init_project(): the standard folder structure has been revised to better reflect research workflow conventions established by The Carpentries and UW-Madison Libraries. The new standard set is data-raw/, data/, scripts/, output/figures/, output/tables/, and reports/. The previous set (data/, data-raw/, images/, plots/, results/, scripts/, docs/, R/) is no longer created by default.
  • init_project(): extra_folders has been renamed to custom_folders. The argument now supports a dplyr-select-like syntax: bare names add folders (e.g. "models"), names prefixed with "-" suppress creation of that folder from the resolved set (e.g. "-output/figures"). Suppression removes only the named leaf -- parent directories are preserved. Duplicate additions emit an informational message and are skipped; references to non-existent folders via "-" emit a warning.
  • create_qmd(): no longer copies styles.css and header.html from the package into the project. Custom styling is now controlled exclusively by the new use_style argument. Projects that relied on create_qmd() copying UW-branded assets should use init_project(uw_branding = TRUE) to scaffold those files, then pass use_style = TRUE to create_qmd() to wire them into the YAML.
  • create_qmd(): sample data is now copied into data-raw/ instead of data/, consistent with init_project()'s folder structure.

New features (continued from above)

  • init_project(): added config argument. When supplied, the folder list in the YAML file replaces the built-in standard structure entirely. custom_folders is still applied on top of the config-derived set. Configs are produced by generate_project_config() and can be stored in the user home directory for reuse across project types.
  • create_qmd(): added include_examples argument (default TRUE). When TRUE, copies a sample dataset (sample.csv) into data-raw/, a placeholder logo (logo.png) into assets/, and uses a worked example template with a params block referencing the sample data. When FALSE, creates a blank skeleton .qmd with only the YAML header and a setup chunk -- no sample data, no logo, no example analysis block.
  • create_qmd(): added use_style argument (default FALSE). Accepts FALSE (no custom styling), TRUE (scans assets/ for .css and .html files), or a directory path (scans that directory instead). When exactly one .css file is found, it is added as css: in the YAML. When exactly one .html file is found, it is added as include-before-body:. If multiple files of either type are found, the function errors and asks the user to specify which one to use via yaml_data. This decouples styling from init_project() and supports non-UW branding workflows.
  • Added inst/templates/skeleton.qmd -- a minimal Quarto template used when include_examples = FALSE. Contains the YAML header, a setup chunk with library(toolero), and a single placeholder heading.
  • Added inst/templates/logo.png -- a placeholder logo image copied into assets/ when include_examples = TRUE. Reads "your logo goes here" so the user knows to replace it with their own branding.
  • write_by_group(): group_col now accepts a character vector of column names, enabling grouping by more than one column at once. Sanitized filenames join multiple columns with -- (e.g. group_col = c("species", "sex") on an Adelie male produces adelie--male.csv); only combinations actually present in the data produce files, not the full cross-product of possible values. When manifest = TRUE, the manifest gains one column per grouping variable (holding the raw, unsanitized value) in addition to a composite group_value column joining the raw values with " | ". Single-column calls are unaffected -- filenames, manifest schema, and behavior are unchanged from previous versions.
  • write_by_group(): added drop_na argument (default TRUE). Rows with a missing value in any grouping column are dropped before splitting, with a cli message reporting how many rows were dropped and from which column(s) -- this was previously silent, undocumented behavior inherited from split(). Set drop_na = FALSE to instead treat missing values as their own group rather than dropping them.

Bug fixes

  • create_qmd(): use_style = TRUE now correctly copies rci-banner.png from inst/assets/ into the project assets/ directory. Previously the banner was only copied inside the include_examples block and was silently omitted when use_style = TRUE was combined with include_examples = FALSE.
  • create_qmd(): filename argument now normalizes the file extension to .qmd via fs::path_ext_set(). Passing "my-document" and "my-document.qmd" both produce my-document.qmd; a double extension is never added.
  • init_project(): path construction now uses fs::path() throughout rather than glue::glue("{path}/{folder}"), ensuring correct behavior on all platforms.
  • init_project(): branding files are now copied from inst/assets/ rather than inst/extdata/, consistent with the rest of the package.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.1 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-10-17
  • NOTE12 OK, 1 NOTE2026-10-01
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
Show 2 earlier changesHide 2 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK5 OK2026-04-25
Advisories

none known

Documentation

In release 0.4.0
READMEYes · 2,514 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 0.4.0Citation fileYes · computed when R runs itWebsiteYes · pkgdown
Help pages
15 (3 internal)includes a package overview page
Examples that run
0%8 only when donttest examples are enabled (R CMD check --as-cran) · 3 never run · 1 hold no code
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
7%

Downloads

2.1K
CRAN downloads in the past year
Rank #14,171 · ~6/day · ~174/mo
Daily download trend is not available in this view yet.
31430 days
82890 days
2.1K1 year
Compare downloads with other packages →
Also on48 r2u2 autocran

Repository

2Stars
0Forks
2Open issues
0Open PRs
3Releases
113Commits
1Commit identities
113 commits · Last activity 2026-10-09 · 0% stars, 30d · Default branch at 0.6.0, ahead of CRAN 0.4.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
10
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2026-05-21 · 12026-08-04 · 2
PracticesBeta

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

Checks run against github.com/erwinlares/toolero 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 (3)
pkgdown

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

pkgdown site last built 2026-10-09

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
Reproducibility and dev environment (1)
renv
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-04-24
    Named in .Rbuildignore: .claude
    Commits: at least 1 crediting it in the message
Models named in its commits
  • Claude Opus 51 commit · 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
26 external dependencies (excludes base and recommended)

Installing toolero adds 83 packages (44 with compiled code, 50 MB of source tarballs). Heaviest: stringi 11 MB, bslib 5.6 MB, pak 3.8 MB.

Depends (1)
R >= 4.2.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.2.0 (2026)
Releases (3)

Pick two releases to compare their code metrics.

  • 0.4.0Latest
    record
    2026-07-16 · current release · diff ↗ ·
    added 6 exports
    arborize, check_project, generate_project_config, qmd_to_r, run_by_group, write_clean_csv
  • 0.3.0
    record
    2026-04-27 · diff ↗ ·
    added 1 export
    generate_kb_xml
  • 0.2.0
    record
    2026-04-24
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-04-24
Total releases
3 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.2.0
Download size
4.0 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("toolero")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

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 toolero version 0.4.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