rjdverse / rjd3revisions

Revision analysis tool
https://rjdverse.github.io/rjd3revisions/
European Union Public License 1.2
3 stars 5 forks source link

Error when building the documentation #48

Open TanguyBarthelemy opened 1 month ago

TanguyBarthelemy commented 1 month ago

Hi I get a problem when documenting the package with:

devtools::document(roclets = c('rd', 'collate', 'namespace', 'vignette'))
ℹ Updating rjd3revisions documentation
ℹ Loading rjd3revisions
Updating vignettes
Rebuilding rjd3revisions.Rmd
Error in `purrr::map2()`:
ℹ In index: 3.
Caused by error in `map_lgl()`:
ℹ In index: 1.
Caused by error in `.jcall()` at rjd3revisions/R/tests.R:71:5:
! java.lang.ClassNotFoundException
Backtrace:
 1. rjd3revisions::revision_analysis(...)
 2. rjd3revisions::cointegration(vt, adfk = 1, na.zero)
      at rjd3revisions/R/revision_analysis.R:147:5
 3. rjd3revisions:::matrix_r2jd(q)
      at rjd3revisions/R/tests.R:735:5
 4. rJava::.jcall(...)
      at rjd3revisions/R/tests.R:71:5
 5. rJava::.jcheck()

Quitting from lines 157-161 [create report] (rjd3revisions.Rmd)

On the other hand, I can build the vignette alone:

devtools::build_vignettes()
ℹ Installing rjd3revisions in temporary library
ℹ Building vignettes for rjd3revisions
--- re-building 'rjd3revisions.Rmd' using rmarkdown

processing file: rjd3revisions.Rmd
  |                                                     output file: rjd3revisions.knit.md

"C:/Users/UTZK0M/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS rjd3revisions.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc4b249ba7bd.html --lua-filter "C:\Users\UTZK0M\AppData\Local\Programs\R\R-4.4.1\library\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\UTZK0M\AppData\Local\Programs\R\R-4.4.1\library\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --section-divs --table-of-contents --toc-depth 2 --template "C:\Users\UTZK0M\AppData\Local\Programs\R\R-4.4.1\library\rmarkdown\rmd\h\default.html" --highlight-style pygments --css "C:/Users/UTZK0M/AppData/Local/Programs/R/R-4.4.1/library/rmarkdown/rmarkdown/templates/html_vignette/resources/vignette.css" --mathjax --variable "mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --include-in-header "C:\Users\UTZK0M\AppData\Local\Temp\RtmpyCFFEB\rmarkdown-str4b245cb11558.html" 

Output created: rjd3revisions.html
--- finished re-building 'rjd3revisions.Rmd'

ℹ Copying vignettes
ℹ Moving rjd3revisions.html and rjd3revisions.R to doc/
ℹ Copying rjd3revisions.Rmd to doc/
ℹ Building vignette index

Related to rjdverse/rjd3bench#2

clemasso commented 1 month ago

Hi, it seems to me that devtools does not manage to find the path of the JAVA classes to run the examples included in the vignette. In the absence of better solution, I corrected the problem by setting 'eval = FALSE' in the vignette r chunks in commit: 21a36e48a22413db3408ccbb7f25a1786362f0f4.