Skip to content

Commit

Permalink
Fix "subscript out of bounds" error
Browse files Browse the repository at this point in the history
From https://bioconductor.org/checkResults/devel/bioc-LATEST/derfinder/nebbiolo1-buildsrc.html

```
* creating vignettes ... ERROR
--- re-building ‘derfinder-quickstart.Rmd’ using rmarkdown

Quitting from lines 343-378 (derfinder-quickstart.Rmd)
Error: processing vignette 'derfinder-quickstart.Rmd' failed with diagnostics:
subscript out of bounds
--- failed re-building ‘derfinder-quickstart.Rmd’

--- re-building ‘derfinder-users-guide.Rmd’ using rmarkdown
Warning in in_dir(input_dir(), expr) :
  You changed the working directory to /tmp/RtmphAsNWX/Rbuild4c29c999c132/derfinder/vignettes/analysisResults (probably via setwd()). It will be restored to /tmp/RtmphAsNWX/Rbuild4c29c999c132/derfinder/vignettes. See the Note section in ?knitr::knit

Quitting from lines 1341-1459 (derfinder-users-guide.Rmd)
Error: processing vignette 'derfinder-users-guide.Rmd' failed with diagnostics:
subscript out of bounds
--- failed re-building ‘derfinder-users-guide.Rmd’

SUMMARY: processing the following files failed:
  ‘derfinder-quickstart.Rmd’ ‘derfinder-users-guide.Rmd’

Error: Vignette re-building failed.
Execution halted
```

It turns out that `citation("derfinderHelper")` has a length of 2. So it automatically
creates two entries in the `bib` object: `bib[['derfinderHelper1']]` and `bib[['derfinderHelper2']]`.
Thus `bib[['derfinderHelper']]` is not found later on, and this leads to the subscript out of bounds.
  • Loading branch information
lcolladotor committed Dec 12, 2024
1 parent 679048f commit 531c2a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vignettes/derfinder-quickstart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bib <- c(
year = 2017, doi = "10.18129/B9.bioc.AnnotationDbi"
),
BiocParallel = citation("BiocParallel"),
derfinderHelper = citation("derfinderHelper"),
derfinderHelper = citation("derfinderHelper")[1],
GenomicAlignments = citation("GenomicAlignments"),
GenomicFeatures = citation("GenomicFeatures"),
GenomicFiles = citation("GenomicFiles"),
Expand Down
2 changes: 1 addition & 1 deletion vignettes/derfinder-users-guide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bib <- c(
year = 2017, doi = "10.18129/B9.bioc.AnnotationDbi"
),
BiocParallel = citation("BiocParallel"),
derfinderHelper = citation("derfinderHelper"),
derfinderHelper = citation("derfinderHelper")[1],
GenomicAlignments = citation("GenomicAlignments"),
GenomicFeatures = citation("GenomicFeatures"),
GenomicFiles = citation("GenomicFiles"),
Expand Down

0 comments on commit 531c2a7

Please sign in to comment.