Skip to content

Commit fb88232

Browse files
bbuchsbaumclaude
andcommitted
chore: fix R CMD check warnings and notes
Fix vignette header to place each %\Vignette directive on its own line, resolving "no recognized vignette engine" warning. Add ^\.beads/ pattern to .Rbuildignore so subdirectory contents are excluded from the built package, resolving hidden files note. R CMD check now passes with 0 errors, 0 warnings, 0 notes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c9a47a2 commit fb88232

File tree

2 files changed

+58
-4
lines changed

2 files changed

+58
-4
lines changed

.Rbuildignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ repomix-output.xml
3232
^README\.html$
3333
^codemeta\.json$
3434
^pybids($|/)
35+
^\.beads$
36+
^\.beads/
37+
^\.ecosystem\.yml$
38+
^AGENTS\.md$
39+
^bidser-top5-prd\.json$

vignettes/quickstart.Rmd

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
title: Getting Started with bidser
33
output: rmarkdown::html_vignette
4-
vignette: |
5-
%\VignetteIndexEntry{Getting Started with bidser} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8}
4+
vignette: >
5+
%\VignetteIndexEntry{Getting Started with bidser}
6+
%\VignetteEngine{knitr::rmarkdown}
7+
%\VignetteEncoding{UTF-8}
68
params:
79
family: red
810
preset: homage
@@ -27,7 +29,11 @@ knitr::opts_chunk$set(
2729
```
2830

2931
```{r theme-setup, include = FALSE}
30-
if (requireNamespace("ggplot2", quietly = TRUE) && requireNamespace("albersdown", quietly = TRUE)) ggplot2::theme_set(albersdown::theme_albers(params$family))
32+
albers_pkg <- "albersdown"
33+
if (requireNamespace("ggplot2", quietly = TRUE) && requireNamespace(albers_pkg, quietly = TRUE)) {
34+
theme_fn <- get("theme_albers", envir = asNamespace(albers_pkg))
35+
ggplot2::theme_set(theme_fn(params$family))
36+
}
3137
suppressPackageStartupMessages({
3238
library(bidser)
3339
library(tibble)
@@ -337,19 +343,62 @@ If you have derivatives indexed, `scope` lets you be explicit about where to
337343
search:
338344

339345
```{r derivatives-query, eval = FALSE}
346+
deriv_path <- get_example_bids_dataset("ds000001-fmriprep")
347+
348+
proj_deriv <- bids_project(
349+
deriv_path,
350+
derivatives = "auto",
351+
index = "auto"
352+
)
353+
340354
prep_bold <- query_files(
341355
proj_deriv,
342356
regex = "bold\\.nii\\.gz$",
343357
desc = "preproc",
344358
scope = "derivatives",
359+
pipeline = "fmriprep",
345360
match_mode = "exact"
346361
)
347362
348363
all_bold <- query_files(
349364
proj_deriv,
350365
regex = "bold\\.nii\\.gz$",
351-
scope = "all"
366+
scope = "all",
367+
return = "tibble"
368+
)
369+
```
370+
371+
`bids_project()` can also be more forgiving with real-world datasets that are
372+
missing `participants.tsv`:
373+
374+
```{r permissive-project, eval = FALSE}
375+
proj_relaxed <- bids_project(
376+
"/path/to/bids",
377+
strict_participants = FALSE,
378+
derivatives = "auto",
379+
index = "auto"
352380
)
381+
382+
derivative_pipelines(proj_relaxed)
383+
```
384+
385+
### Run-Level Variables and Report Data
386+
387+
For downstream analysis in R, `variables_table()` gives you a run-level tibble
388+
that nests scan inventory, events, and confounds without changing the existing
389+
subject or file APIs:
390+
391+
```{r variables-report, eval = FALSE}
392+
vars <- variables_table(
393+
proj_deriv,
394+
scope = "all",
395+
pipeline = "fmriprep"
396+
)
397+
398+
vars[, c(".subid", ".task", ".run", "n_scans", "n_events", "n_confound_rows")]
399+
400+
report <- bids_report(proj_deriv, scope = "all", pipeline = "fmriprep")
401+
report
353402
```
354403

355404
### search_files() Still Works

0 commit comments

Comments
 (0)