structure(NULL, xxx = "something") sinceR-devel circa start of April 2025 turned that construct to anerror).changed the condition in the test fixing the issue in Rdpackv2.6.1 togetRversion() < "4.5.0", which is less likelyto need further change for R-4.4.x releases.
removed ‘RdpackTester’ from./inst/examples. It wasmeant to provide a convenient way to create bug examples but was leftincompletee.
RStudio_reprompt now issues a more informative errormessage when not called on a suitable file or function. Fixes issue #30,reported by
now the LaTeX macro\slash is wrapped in acondition, so that it is passed on for LaTeX related output butconverted to/ for other formats (such as html). FixesGeoBosh/rbibutils#9, reported by
fixed the test for the fix in Rdpack v2.6.1 (see below) to workwith R-4.4.2, since that R-devel change was not carried on to R-4.4.2.(Note: the error concerns the test only. The fix in the code of thepackage works for any R version.) Fixes issue #37, reported by
insert_bib (and a related test) tohandle that.fixed issues causing ‘lost braces’ (actually, superfluous braces)NOTEs from checks in R-devel occuring with some accented LaTeXcharacters. These NOTEs are not yet activated on CRAN but if/when theydo, developers using Rd macros\insertRef and\insertCite can eliminate them by building their packageswith Rdpack (>= 2.6) and rbibutils (>= 2.2.16). Thanks toSebastian Meyer for tracing down the issues.
fixed aSweave expression in ‘man/predefined.Rd’ tonot emit unnecessary braces (see the note above).
Rd macrosinsertCite and friends were calling\insert_citeOnly() with argumentkey insteadofkeys. This was not an error since partial matching is okhere but not good practice. Fixes issue #28 reported by MarcelRamos.
changed the saved value in “tests/testthat/dummyArticle.rds” usedin ‘test-bib.R’ with a value obtained with R-devel r84896 n previuversins of R there wasasuperfluous final ’ .’).
in some cases when square brackets were requested, rather thanround ones,\insertCiteOnly was using closing roundparenthesis.
in some cases\insertCiteOnly was not handling wellthe last cite when it was followed by free text.
new Rd macro\insertCited{} works like\insertAllCited but empties the references list afterfinishing its work. This means that the second and subsequent\insertCited in the same help page will list only citationsdone since the preceding\insertCited. Prompted by issue#27 to allow separate references lists for each method and the class inR6 documentation.
It is no longer necessary to remove backslashes from\& and similar in bibtex files (e.g. in “John Wiley& Sons”). The backslash was appearing in the rendered pdf manual butR-devel’s checks started to warn about it recently with something likecheckRd: (-1) pcts-package.Rd:287: Escaped LaTeX specials: \&(starting June 2022). This could be avoided by removing the superfluousbackslash in the bib file but this is annoying since this is propersyntax for the latter. Concerned packages should rebuild the tarballwith Rdpack (>= 2.4) or remove the offending backslashes from theirbib files. (addresses issue #26)
\insertCite, two or more accented Latincharacters were rendered with superfluous curly braces, see issue#25(reported by Manuel López-Ibáñez) andhttps://stat.ethz.ch/pipermail/r-devel/2022-April/081604.html.Rdpack andcould requireRdpack >= 2.3 to ensure that usersinstalling their package don’t do that accidentally withRdpack 2.2.\doi Rd macros resulted in warnings fromR-devel’s checks for packages that use Rdpack built with the releasedversions of R. This fixes it. (fixes #24)Rdmacro\insertCite gets a new feature allowing todrop parentheses for parenthesised citations, analogous to natbib’s\citealp in latex. This makes it possible to use markuparound the citations outside the arguments of the macro. This fixesgithub issue #23 by
updated vignette “Inserting_bibtex_references” and otherdocumentation.
the pkgdown site now has aSearch button on thenavigation bar.
fixed a test that was failing with versions of rbibutils beforev2.1.1 (issue reported by Andreas Tille).
if the version of rbibutils is greater than v2.2.5, parsing bibfiles withrbibutils::readBib now usestexChars = "Rdpack". This ensures proper rendering of\'i in references (by converting\'i to\'\i which base R renders correctly). For detaileddiscussion of this see issue GeoBosh/bibutils#7 and NEWS.md in rbibutilsv2.2.4 and v2.2.5.
Rdmacros generating references now drop theURLfield if adoi field generating the same URL is present.This avoids repetition of the URL since rendering thedoifield produces the URL anyway.
now references with identical authors are sorted byyear.
fixed rebib() to process doi’s properly.
now checks on github (using github actions) are done on the threemajor platforms for the following versions of R: release, devel, oldrel,and 3.3.
now a warning (rather than error) is issued if package ‘testthat’is not available for tests.
now bibtex files are parsed with optiondirect = TRUE when the version ofrbibutils is>= ‘2.1.2’. This fixes GeoBosh/rbibutils#3 for Rdpack users (althoughthat needs fixing also fordirect = FALSE).
InviewRd, the default for the help type now isoptions("help_type") (previously the default was"text").
forroxygen2 users, added a note in README andRdpack-package.Rd not to indent by exactly four spaces\insertAllCited{} relative to@references whenmarkdown mode is activated. This is to avoid it being translated byroxygen2 as verbatim (\preformatted) text, seeissue (#18).
moved packagegbRd to Suggests.
fixed uses of in several examples (necessitated by a change inR-devel circa February 2021).
dramatic speed up of processing of bibliography references, mostnoticeable for users with large number of help pages and largeREFERENCES.bib. (prompted by Kisung You, issue#17)
amended the warning message from bibliography macros to mentionduplicated keys.
added entry forrbibutils inREFERENCES.bib.
corrected wrong citation ofrbibutils.
bibtex fromSuggests andelsewhere.importedrbibutils and made suitable adjustments tothe code.
movedbibtex toSuggests (sincebibtex has been orphaned for several years).
gbutils,which is not among the dependencies ofRdpack. This wasraising a NOTE on one of the CRAN testing machines.viewRd() now loads also Rd macros declared by thepackage to which the rendered Rd file belongs. Previously only macrosfromRdpack were loaded but now there is at least one otherpackage,mathjaxr, which defines Rd macros.
movedgrDevices toSuggests.
edited some documentation files.
in documentation of S4 classes, such as"classname-class.Rd",reprompt() was sometimesinserting entries for slots already listed in the Slots section. Thesame bug was causing the new slots not to be reported properly to theuser.
in some casesreprompt() failed to process properly\S4method entries in the Usage section of Rd files. Nowfixed.
reprompt() now handles\S4methodstatements for replacement methods. As for other functions and methods(S3 and S4), it is sufficient to put a declaration with empty argumentlist in the Usage section andreprompt() will insert thecorrect formal arguments for the method (they may be different fromthose of the generic).
reprompt() now gives a more helpful error messagewhentype is invalid.
corrected some minor typo’s in the documentation.
README and the documentation ofreprompt() andRdpack-package now give more details onreprompt()ing replacement functions.
README.md and README.org now give the correctinstall.packages instruction for CRAN (pull request #10from
some examples were leaving a stray file,dummyfun.Rd, afterR CMD check.
Updated the vignette about\insertFig,\printExample and\runExamples, to reflect thelifting inR 3.6.0 of some limitations of Rd processing inprevious R versions.
Vignette ‘Inserting BibTeX references’ now includes a section onbibliography styles. This section was previously only inREADME.
The fix in Rdpack 0.10-3 (see below) for an issue introduced inR-devel in Oct 2018 will be made permanent, at least for now. This fixresolves also a similar issue in packagepkgdown, see thediscussion at https://github.com/GeoBosh/Rdpack/issues/9 for details andfurther links.
\insertAllCited{} to appear in a single paragraph in thehtml rendering of the Rd documentation.added pkgdown site to DESCRIPTION.
README and the vignette about evaluated examples now state thatR-devel no longer gives warnings about\Sexpr not being atop level section. This means that macrorunExamples whichcreates section ‘Examples’ containing code and results of evaluationwill be useable in CRAN packages.
new functionRdo_fetch() gets the Rd objectrepresenting a help page from an installed or source package. It worksalso for packages under devtool’s developer’s mode
The site created with pkgdown contains fewer errors now. (Notethat the documentation builds without error with R’s tools).
Started moving tests from my local setup to testthat.
nowREFERENCES.bib is read-in using the declaredencoding for the corresponding package. If there is no declaredencoding, “UTF-8” is assumed.
Now macros\insertCite and\insertCiteOnly use the correctresults=rdinstead ofresults=Rd. This was not catched byRs building tools but caused errors when processed withpkgdown::build_site(). Fixes issue#8. Also fixesr-lib/pkgdown#784. Thanks toJay Hesselberth foruncovering this.
now references produced by the citation macros for BibTeX entriesof type@book and@incollection treat field‘series’ similarly to other BibTeX styles, including JSS (issue#7 raisedby Kisung You). Note that even though the underlying base R tools arebased on JSS, they treat this field differently.
Bugfix: now Rd macro\printExample evaluates theexpressions in the correct environment.
help page ofget_usage() gets a fairly completeDetails section with numerous evaluated examples.
nowrun_examples() escapes% bydefault, before returning the text. This is needed for text that is tobe included in an Rd file. It can be turned off by setting the newargumentescape toFALSE.
nowreprompt() gives a more informative errormessage if an Rd file describes a non-existent S4 class. This is notcaptured byRs tools. It can happen during development if aclass is removed.
now reports printed byreprompt() about methodsdocumented in Usage sections, but no longer existing, are more readable.This is due to a new print method for (the mostly internal) class“f_usage”.
Many features of Rdpack are best demonstrated on a package. Thenew package RdpackTester under./inst/examples now makesthis easier.
now the help page “predefined.Rd” does not print some tablestwice in the pdf manual. (This was due to using\if{latex}{}{} instead of\ifelse{latex}{}{}for those tables.)
also in “predefined.Rd”, removed illegal use of vertical bars (incolumn specifications of tabular environments) from the pure LaTeX codein the\ifelse clause(s) and wrapped them in\out{}.
in “get_sig_text.Rd”, replacehelp() withutils::help() to avoid warnings from more stringentR CMD check. Similarly, in “Rdpack-package.Rd” replacepackageDescription() withutils::packageDescription(). This may be needed in\Sexpr’s more generally (TODO: check ifthese would still be needed if the symbols are imported by thepackage.)
\eqn{}.new macro\printExample for inclusion of examplecomputations in narrative sections, such asDetails. Thecode is evaluated and printed similarly toR sessions butthe code is not prefixed and the output is prefixed with commentsymbols, eg.
2+2##: 4new experimental macro\runExamples for use as toplevel section in an Rd file as a replacement of section\examples.\runExamples{code} evaluates thecode and creates section\examples containing the code andthe results (similarly to\printExample). So,\runExamples{2 + 2} produces
\examples{2 + 2##: 4}The generated sectionexamples is processed by R’sdocumentation tools (almost) as if it was there from theoutset.
new experimental macro\insertFig to create a figurewithR code and include it in the documentation. Therelated macro\makeFig just creates a graphics file, whichcan be included with the standard Rd command\figure.
new vignette gives a brief description of the newmacros.
\insertRef and\insertAllCited (see below) - in the renderedNews on CRAN the backslashed words had disappeared.\insertRef and\insertAllCited macrosnow supportbibstyles for formatting references (featurerequested by Jamie Halliday, issue#5). UseRdpack (>= 0.8) inImports: to use thisfeature. Currently only long author names are supported but completesupport for styles can be added trivially if requested.
updates to the documentation, in particular the bulk ofRdpack-package.Rd was from 2011!
improvements to handling of free form citations in textualmode:
(bugfix) now the whole citation is not parenthesised in textualmode,
the handling for textual mode was incomplete in that additionaltext after the citation was not put inside the parentheses along withthe year.
updates to the documentation.
fix a bug inRdo_locate_core_section().
consolidated the changes introduced since the previous CRANrelease of Rdpack (it was 0.5-5) in preparation for the next release.Users of the new macros for citation can useRdpack (>=0.7) in theImports: field offile “DESCRIPTION” to ensure that they are available.
comprehensive overhaul of handling of errors and warnings duringprocessing of references and citations. In particular, such errorsshould (in most cases) produce only warnings duringR CMD build andR CMD INSTALL, and not preventthe package from being built and installed.
Unresolved BibTeX keys produce warnings during building andinstallation of the package, but not errors. Dummy entries are insertedin the documentation explaining what was amiss (currently with ‘author’A Adummy).
new Rd macros for citations
\insertCite inserts citation(s) for one or more keysand records the keys for\insertAllCited (seebelow).
\insertCiteOnly is similar to\insertCite but does not record the keys.
\insertNoCite records the keys but does not producea citation.
\insertAllCited prints a bibliography including allreferences recorded by\insertCite and\insertNoCite.
new entries in this file will use markdown syntax.
updates to the documentation.
get_bibentries() gets a new argument “everywhere”.When is is TRUE, the default, unescaped percents are escaped in allbibtex fields, otherwise the replacement is done only in field“URL”.
removed severalprint() statements which wereaccidentally left in the code in v. 0.5-6.
updated help page ofget_bibentries() and includedexamples.
cleaned up the imports in NAMESPACE.
insert_ref() and Rd macro\insertRefshould now work ok in the presence of percent encoded symbols in URLfield of a BibTeX entry. Closes issue “Unexpected END_OF_INPUT error(URL parsing?)”, seeRdpack issue 3,raised byjdnewmil.
get_bibentries() now takes care of percent encodedsymbols in URLs. It now returns an object from class “bibentryRd”, whichinherits from “bibentry” but has its own print method which escapes orunescapes the percent signs in URLs depending on the requested outputstyle. This was also reported by byjdnewmil in issue#3 referencedabove.
get_bibentries() now tries to load thebib file from the development directory of argument“package”, in case it is in development mode under “devtools”. (Eventhough the search is withsystem.file(), whichdevtools replaces with its own version, the bib file stillneeds to be looked for in “inst/”, i.e. it is not in the root directoryas is the case in installed packages.)
Streamlined the help page ofreprompt() andRdpack-package.
new argument,edit, inreprompt() opensthe Rd file after updating it.
new functionereprompt()(e' for _edit_)* opensreprompt()with suitable defaults to replace the original Rd file and open it in an editor, otherwise equivalent toreprompt()`.
now ifinfile does not exist,reprompt(), and henceereprompt(), strips thedirectory part, finds the root of the package directory, and looks forthe file underman/ (this uses packagerprojroot’). In particular, if the working directory isanywhere under the package root,infile can be simply thename of the Rd file, without path.
now README.md is generated from README.org. I changed the layoutand amended the information in it.
README.* now get links togeorgisemacs for anemacs function toreprompt() the Rd file at point.
viewRd() now works also when the file is from apackage under devtools’ development mode on any platform (e.g. RStudio,Emacs/ESS, Rgui).
new RStudio add-inReprompt, contributed by DuncanMurdoch. If the file being edited in the RStudio’s code editor is an Rdfile it callsreprompt(). If the file is as R source file,it looks for the help page of a selected object name and works on it iffound, otherwise creates one.
added the version ofRdpack to the abstract of thevignette. This seems more informative than giving the compilationdate.
nowreprompt() doesn’t give spurious warnings aboutunknown Rd macros when the Rd file contains user defined Rd macros.These warnings were harmless and rare, but alarming andannoying.
fixed a bug ininspect_args() which caused thewarning“In is.na(x) : is.na() applied to non-(list or vector) oftype ‘NULL’” inreprompt(), when the signature of afunction in “Usage” section was empty.
added the github url to DESCRIPTION.
now give a more informative warning if a key is missing fromREFERENCES.bib (thanks to Kisung You for suggesting this).
tools::parse_Rd() rather thanparse_Rd()(before this was not necessary since ‘gbRd’depended on‘tools’).new functionviewRd() parses and shows an Rd file ina source package.
May be particularly helpful for devtools developers.
revamped the vignette, added additional explanations of possibleissues.
new functionsmakeVignetteReference() andvigbib() generate Bibtex references for vignettes in apackage.
Added the requirement toImport Rdpack to thehelp page ofinsert_ref(). (It was out of sync with thevignette.)
Updated Description in DESCRIPTION, which was also out of syncwith the vignette.
Bug fix in the vignette: changed\@references to@references in the roxygen2 example.
Edited and amended vignette“Inserting_bibtex_references”, including:
additional explanation and an example,
requirement to import Rdpack and a mention of travisetc.
paragraph about devtools.
changed the URL for parse_Rd.pdf in REFERENCES.bib tohttps.
new facility for inserting references from BibTeX files - justput the line:
RdMacros: Rdpackin theDESCRIPTION file of your package and thereferences ininst/REFERENCES.bib. Then put\inserRef{key}{yourpackage} in documentation chunks toinsert itemkey from the bib file. This works with bothmanually created Rd files and roxygen comments, see the documentationfor details.
from now on, put next to versions published on CRAN (asabove)
a minor correction in file NEWS.
reprompt() andrebib().don’t exportparse_text
corrected bug in reprompt for S4 classes - new slots were nothandled correctly (seeslots.R for details).
in reprompt for S4 methods: if the methods documentationdescribes methods that do not exist, print an informative message forthe user. (Such methods are also printed for debugging purposes but innon-user friendly form.)
includedmethods inImports: - aroundR-devel version 2015-07-01 r68620 not including it triggerswarnings)
new functions.whichtageq and.whichtagin; replaced most calls totoolsdotdotdotRdTags with these.
removedtoolsdotdotdotRdTags
removed::: calls from code; copied some functionsfromtools to achieve this (see “threedots.R”). Renamed thefunctions replacing::: with dotdotdot.
export by name (not the generic export pattern); preparation formore selective export of functions in the future.
new functions:Rdo_get_argument_names,Rdo_get_item_labels
dependencebibtex becomes “Imports”.tools andgbRd remain (for now) “Depends”since functions from them are used in some examples withoutrequire()’s.
rebib(): nowoutfile="" can be used torequest overwritinginfile. (a small convenience; beforethe change, one could do this by giving theoutfile andinfile the same values.)
Bug fix:predefined.Rd contained\tabular environments with vertical bars,|,in the format specification. This is not documented in “Writing R exts”but works for LaTeX and remained unnoticed by me and R CMD check.However, rendering the help page for the objects documented in“predefined.Rd” gave an error in html and text mode. Packageinstallation failed only if html was requested at build time.
small changes in the documentation
new major feature: processing references from Bibtex files. Thetop user level function isrebib(), which updates section“references” in an Rd file.promptPackageSexpr() has beenupdated to use this feature.inspect_Rdbib() can be used inprogramming.
new auxiliary functions for work withbibentryobjects.
new convenience programming functions for Rd objects.
some small bug fixes.
some gaps in the documentation filled.
reprompt() was not handling properly S4 replacementmethods. Changed the parsing of the arguments to rectify this. Someother functions also needed correction to handle this.Depends field in DESCRIPTION file updated to require R2.15.0 or later (because of a few uses ofpaste0() inrecent code).