Repository navigation
[Linting Rule] Package Data
Generated from 'wiki-linter.ts' on 2026-10-25, 09:29:25 UTC (v2.16.6), do not edit directly.
Package Data [overview]
This rule ports the following steps of R CMD check (see the conformance table for the legend):
| # | Step | Coverage | Note |
|---|---|---|---|
| 34 | LazyData (book) | 🟩 | the size of the installed LazyData database is not checked |
| 48 | for missing documentation entries (book) | 🟩 | S4 classes and methods are not checked |
| 60 | contents of 'data' directory (book) | 🟩 | data sets are not loaded |
| 61 | data for ASCII and uncompressed saves (book) | 🟩 | no recompression to estimate the savings |
| 62 | R/sysdata.rda (book) | 🟩 | no recompression to estimate the savings |
| 63 | serialization versions (book) | 🟩 | .rds files and xz compressed saves are not read |
| 64 | data for non-ASCII characters (book) | 🔶 | the encodings of saved strings are not read |
This rule is a best-effort rule.
Finds problems in data/ and R/sysdata.rda: allowed file types, LazyData, compression, the serialization version R needs, and undocumented data sets.
This linting rule is implemented in src/linter/rules/cmd-check/package-data.ts.
Linting rules can be configured by passing a configuration object to the linter query as shown in the example below.
The package-data rule accepts the following configuration options:
-
checkCompaction
report saves that a stronger compression would make much smaller
R CMD check #61, #62 -
checkUndocumented
report data sets no Rd page documents
R CMD check #48 -
maxUncompressedSize
an uncompressed or ASCII save above this many bytes is flagged
R CMD check #61, #62
A project with the code R/code.R:
f <- function() 1and the files
DESCRIPTION:
Package: pkg
Version: 1.0
Title: A Package
License: MIT
data/notes.md:
what the data means
The linting query can be used to run this rule on the above example:
[ { "type": "linter", "rules": [ { "name": "package-data", "config": {} } ] } ]Results (prettified and summarized):
Query: linter (1 ms)
╰ Package Data (package-data):
╰ certain:
╰ 'data/notes.md' is not of a type allowed in a 'data' directory at /pkg/data/notes.md:1.1
More examples are the test cases in test/functionality/linter/cmd-check/lint-package-data.test.ts.
Currently maintained by Florian Sihler and Oliver Gerstl at Ulm University
Email | GitHub | Penguins | Portfolio
- 🧑💻 Developer Onboarding
- 💻 Setup
- 👓 Overview
- 🪟 Interfacing with flowR
- 🌋 Core
- 🧹 Testing & Linting (Benchmark Page)
⁉️ FAQ- ℹ️ Extra Information