[Rd] running examples with enhanced help engine also requires mime package
deep@y@n@@@rk@r @end|ng |rom gm@||@com
Sat Mar 26 19:01:40 CET 2022
On Fri, Mar 25, 2022 at 9:48 PM Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> On 25/03/2022 12:07 p.m., Kevin Ushey wrote:
> > Hi,
> > The new enhanced help system is fantastic! I've been playing around
> > with the enhanced help system introduced recently in R 4.2.0, and I
> > noticed one minor issue. When attempting to run examples from within a
> > Help page (in HTML help), if the knitr package is not installed, one
> > sees:
> > To view output in the browser, the knitr package must be installed.
> > I think this is expected. However, after installing the 'knitr'
> > package and attempting to run examples again, I see:
> > Error in loadNamespace(x) : there is no package called 'mime'
> > as it looks like 'knitr' (or a dependency?) is trying to use 'mime'
> > behind the scenes in the Help server. Because 'mime' is not an
> > explicit dependency of 'knitr', running install.packages("knitr")
> > isn't sufficient to ensure 'mime' is also installed (which a user
> > might have expected).
> > I'm not sure if this should be resolved in 'knitr' (e.g. via just
> > depending on the 'mime' package) or if this should be tweaked in R
> > itself.
Thanks for the report and diagnosis.
I guess the R-level workaround would be to write a replacement for
knitr::image_uri(). That would probably have been fine if we forced
png to be the only output format, but I see no reason to restrict to
specific formats, so the flexibility is useful.
So I'll just add mime to the message.
> This is related:
> Duncan Murdoch
> R-devel using r-project.org mailing list
More information about the R-devel