Version 2026.8.20
A file-length limit for analysis projects
-
initialize_project()takesmax_loc_per_file. It stops with an error naming every .R file that holds more code lines than the limit. The check runs before the package check and before sourcing, so an oversized file stops the project without installing or running anything first. The default isInf, which checks nothing. The argument otherwise takes one whole number of zero or more, and rejects anything else. -
loc_per_file()is new and exported. It counts the code lines in each file you give it. A code line is a physical line that is neither blank nor entirely a comment. - The R parser identifies the comments, not a regular expression. A regular expression skips a line inside a string that starts with
#, and it cannot separate a comment that follows code from a comment that fills the line. Measured across the 237 R files of the package fleet, the two approaches disagree on 11 of them. The largest gap is 203 lines, in a file that embeds an R template as a single string.
Bug fix: path() deparsed a multi-element component into the path
-
path()passed its...topaste0()as a single list.paste0()coerces a list withas.character(), which deparses each element, sopath("home/", c("x", "y"))returned the one stringhome/c("x", "y"). -
path()now recycles its components against each other, the wayfile.path()does.path("home", c("a.csv", "b.csv"))returns two paths. A component of length zero givescharacter(0), rather than a path with an empty segment. - The documented return value was already “a character vector”, so this makes the function match its own documentation.
- This changes behaviour for any caller that passed a multi-element component and did not notice. Such a call previously produced a path containing R syntax, which no file or folder matches.
Bug fix: a project with several source folders was never checked
-
initialize_project()built its list of source folders with onepath(home, folders_to_be_sourced)call, so it hit the defect above. Every check reading that list saw nothing wheneverfolders_to_be_sourcedheld more than one folder. That silently disabledcheck_missing_packages(). - Sourcing was never affected.
source_to_environment()loops over the folders and callspath()once per folder. -
This changes behaviour for a project with several source folders, even at the default
max_loc_per_file = Inf. Such a project was never checked for missing packages, and now it is. It can therefore stop, or install a package, where earlier versions did neither.
Bug fix: files without a .R extension were sourced
-
source_to_environment()selected files with the pattern"*.[rR]$". A leading*has nothing to repeat, so the pattern matches any name ending inrorR, not only an extension.helper,fooRandREADMERall matched, andinitialize_project()sourced them. - The pattern is now
"\\.[rR]$"insource_to_environment()and in the newmax_loc_per_filecheck, which have to agree about which files they cover. -
This changes behaviour for a project holding an extensionless file whose name ends in
rorRinside a sourced folder. Such a file was sourced before and is not sourced now.
Documentation
- The package now generates its documentation with roxygen2 8.0.0.
DESCRIPTIONcarriesConfig/roxygen2/versionin place ofRoxygenNote. -
docsanddata-raware in.Rbuildignore.R CMD checkreported both as non-standard top-level files, and reported the generated font filenames underdocs/depsas non-portable paths.
Version 2026.8.6
Licensing
-
DESCRIPTIONAuthors@Rnow declares Richard Aubrey White as the copyright holder, withrole = "cph". It declared none at all, and neither did any other package in the fleet. Nothing inR CMD checkreports that. - The copyright year is now 2026. It read 2025.
-
CLAUDE.mdnow carries a Licensing section, so the year gets checked rather than silently ageing.
Corrections
- The 2026.8.3 entry described the
set_results()bug wrongly, on three counts.is.na()on an environment returnslogical(0), notFALSE. The surroundingifthen stopped on a zero-length condition, so the environment never reacheddir.exists(). The message was “argument is of length zero”, not “invalid filename argument”.dir.exists()does give the latter when it is called directly, which is where the string came from, but that path never ran. The entry is corrected. - The same entry said multi-element character paths remain unsupported. They work.
set_results()given two paths where only the second exists returnsNULLand selects that one. It errors only when none of them exists. The sentence is removed. -
ls_files()was titled “List files and directories recursively”. It does not recurse: it callslist.files()withoutrecursive = TRUE. Giventop.Randsub/deep.Rit returnssubandtop.R, and never findsdeep.R.
Documentation
- All roxygen prose in
R/, plusvignettes/org.Rmd,README.mdandindex.md, now follows ASD-STE100 (Simplified Technical English). Every sentence in those files runs to 25 words or fewer. The change splits long sentences, prefers the active voice, and marks requirement levels with RFC-2119 keywords. No behaviour changed. - Seven roxygen readings ran over 25 words and every one was a splitter merge, not a long sentence. The fields carried no terminal punctuation, so a sentence splitter ran through
@paraminto@returnand on into the next block’s title. The longest such reading was 65 words; its longest real component was- Adding the missing full stops fixed the grammar and the measurement.
Version 2026.8.3
Fixed
set_results(), which failed with “argument is of length zero” whenever it was called afterinitialize_project().initialize_project()stores the sourcing environment inorg::project$env. The folder-creation loop appliedis.na()to that environment. On an environmentis.na()returnslogical(0), with a warning, rather thanFALSE. The surroundingifthen received a zero-length condition and stopped. Non-character entries are now skipped.Added runnable examples to
projectandset_results(), which previously had none.Replaced the
\dontrun{}examples oninitialize_project(),move_directory(), andwrite_text()with examples that run againsttempdir().Added
@familycross-links (project setup; file utilities) and a@seealsopointing atvignette("org")to all seven exported objects.Added
index.md,pkgdown/, andRplots.pdfto.Rbuildignore. # Version 2026.4.9Added
install_missing_packagesargument toinitialize_project(). Scansfolders_to_be_sourcedforlibrary(),require(), andpkg::usage. Errors on missing packages by default; setinstall_missing_packages = TRUEto auto-install viapak(falls back toinstall.packages()).Removed
package_installed().Removed
create_project_quarto_internal_results()andcreate_project_quarto_external_results().
Version 2025.6.24
- Improved roxygen2 documentation formatting, grammar, and clarity across all exported functions.
- Enhanced parameter descriptions with better punctuation and consistency.
- Updated function titles to be more concise and direct.
- Significantly expanded and improved the package vignette with:
- Enhanced introduction explaining why to use
org - Installation instructions for CRAN and GitHub
- Quick start section for new users
- Team collaboration examples showing multiple path usage
- Comprehensive function reference organized by category
- Common workflows and practical examples
- Cross-platform path construction guidance
- Troubleshooting section with solutions to common issues
- Better formatting and organization throughout
- Enhanced introduction explaining why to use
Version 2024.6.5
CRAN release: 2024-06-04
- Fixed an error with org::initialize_project where “//” at the start of a path will be removed.
Version 2022.12.28
- Inclusion of
create_project_quartothat provides an example project of how to useorgwith quarto. - Inclusion of file utility functions, such as
ls_files,move_file_or_dir,path. - Inclusion of utility function
package_installed.
Version 2022.7.21
CRAN release: 2022-07-20
- Reduction of exports to: initialize_project, set_results, write_text.
- initialize_project now takes in
envas an argument (the environment into which the functions will be sourced).
Version 2020.2.17
Introduction of: - write_text - initialize_project - set_results - org::project
Depreciation of: - AllowFileManipulationFromInitialiseProject - InitialiseProject - PROJ - set_shared
