Kevin Ushey
2022-Mar-25 16:07 UTC
[Rd] running examples with enhanced help engine also requires mime package
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, Kevin
Duncan Murdoch
2022-Mar-25 16:13 UTC
[Rd] running examples with enhanced help engine also requires mime package
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.This is related: https://github.com/yihui/xfun/issues/63 Duncan Murdoch