[R-pkg-devel] Advice on identifying parsing failures with examples when trying to pkgdown my package
Chris Evans
chr|@ho|d @end|ng |rom p@yctc@org
Sat Apr 10 21:28:02 CEST 2021
My beginner package https://github.com/cpsyctc/CECPfuns is evolving slowly and I had no problems (that I could see)
with the help pages created through roxygen. Today I came back to try using pkgdown to ... pkgdown the package.
So I used a copy of the package directory and ran:
usethis::use_pkgdown()
and then
pkgdown::build_site()
That produced the start of exactly what I wanted as a nicely pkgdown'ed site. However, the console showed error
messages for three examples (which, as I say, all seem to produce OK html help pages through the usual roxygen
processing). The error message was
Failed to parse example for topic
and sure enough the examples section in the pkgdown docs html was empty. If anyone wants to look at one of
the functions, checkAllUnique was one of the three that threw the errors.
I tried some searching and the most pertinent seeming page I hit was this:
https://github.com/r-lib/pkgdown/issues/1149
where Hadley Wickham says "That's not valid .Rd code because you didn't escape the Rd comment symbol" which may
well be my problem too ... but I don't understand the advice (sorry!)
When I tried to tweak one of those functions by inserting a lot of "#" to mask results, i.e. replaced
#' [1] something
with:
#' # [1] something
(as I probably should have done that in the examples I have, they are dontrun examples so I hadn't noticed).
However, when I reran pkgdown::build_site() I got a new error message that is, to me, thoroughly confusing:
Error in utils::modifyList(meta, override) : is.list(x) is not TRUE
At that point I decided to back out and come here and ask the question in the subject line!
TIA,
Chris
--
Chris Evans (he/him) <chris using psyctc.org> Visiting Professor, University of Sheffield <chris.evans using sheffield.ac.uk>
I do some consultation work for the University of Roehampton <chris.evans using roehampton.ac.uk> and other places
but <chris using psyctc.org> remains my main Email address. I have a work web site at:
https://www.psyctc.org/psyctc/
and a site I manage for CORE and CORE system trust at:
http://www.coresystemtrust.org.uk/
I have "semigrated" to France, see:
https://www.psyctc.org/pelerinage2016/semigrating-to-france/
https://www.psyctc.org/pelerinage2016/register-to-get-updates-from-pelerinage2016/
If you want an Emeeting, I am trying to keep them to Thursdays and my diary is at:
https://www.psyctc.org/pelerinage2016/ceworkdiary/
Beware: French time, generally an hour ahead of UK.
More information about the R-package-devel
mailing list