Furthermore, I think you can simply use rmarkdown::pandoc_available("1.12.3") to answer both questions (is pandoc available, is the particular version or a later version available).
Maëlle. Den fredag 6 december 2019 17:30:28 CET, Henrik Bengtsson <henrik.bengts...@gmail.com> skrev: Hugh is correct. To clarify, update if (!rmarkdown::pandoc_available() || rmarkdown::pandoc_version() < "1.12.3") { stop("'brinton' requires Pandoc v < 1.12.3 (https://pandoc.org/)") } The reason is that when using 'a || b', expression 'b' will NOT be evaluated if 'a' is not TRUE. In contrast, when you use 'a | b', expression 'b' will be evaluated regardless of outcome of 'a'. A good rule of thumb is: If you expect your OR or AND statements to give a single/scalar TRUE of FALSE, use || or &&. This is commonly used in if(), and while() conditions. /Henrik On Fri, Dec 6, 2019 at 4:18 AM Hugh Parsonage <hugh.parson...@gmail.com> wrote: > > Change | to || > > On Fri, 6 Dec 2019 at 11:08 pm, Pere Millan Martinez <i...@sciencegraph.org> > wrote: > > > Yesterday the publication of the new brinton package war archived > > (https://cran.r-project.org/web/packages/brinton/index.html) because the > > following line produces the following error: > > > > if(rmarkdown::pandoc_available() == FALSE | rmarkdown::pandoc_version() > > < "1.12.3") {stop("'brinton' requires Pandoc v < 1.12.3 > > (https://pandoc.org/)")} > > > > Error in if (rmarkdown::pandoc_available() == FALSE | > > rmarkdown::pandoc_version() <: > > argument is of length zero > > > > The checks of the knitr package produce similar errors > > (https://cran.r-hub.io/web/checks/check_results_knitr.html) but knitr is > > available in CRAN (furtunatelly). > > Also, I have been punished by prof. Brian Ripley so I can not resubmit > > the package until January. > > > > Do you have any clue about how to fix this? Does to punish rookies have > > sense in this case? > > > > Thanks in advance, > > -Pere Millán > > > > > > > > On 10/11/2019 11:31, Pere Millan Martinez wrote: > > > Hello, > > > > > > I'm trying to submit a first version of the brinton package but the > > > CRAN-pretest on Debian produces the following NOTE: > > > > > > Check: for detritus in the temp directory, Result: NOTE > > > Found the following files/directories : > > > ‘calibre_4.2.0_tmp_BPGKxL’ ‘calibre_4.2.0_tmp_D8BXMj’ > > > ‘calibre_4.2.0_tmp_M8RU75’ ‘calibre_4.2.0_tmp_TipWj0’ > > > ‘calibre_4.2.0_tmp_f0mVQS’ ‘calibre_4.2.0_tmp_fHEPce’ > > > ‘runtime-hornik’ > > > > > > The 'brinton' package stores files in the temporary folder (which I > > > think is ok) but I can not figure out > > > the relationship between the files that are stored with > > > 'calibre_4.2.0'. Is this note a false positive or this > > > is something that I should fix prior to submit? > > > > > > Thank you, > > > Pere Millán-Martínez > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-package-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-package-devel > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel