Re: [ESS] Can't find documentation for function
Hi Haris, That is because ESS intercepts `?` calls instead of evaluating them. As a workaround you can call the devtools implementation of `?` manually: ``` pkgload:::shim_help(foo) ``` I'd like to do better as it would improve my day-to-day but this hasn't been a priority. Best, Lionel On 9/19/22, Haris Fawad via ESS-help wrote: > Hi Marc, > > Yes, I load the package via devtools::load_all() before typing ?foo. When I > do the same in the R GUI-app I get the expected behaviour: the > documentation gets rendered and shown as an html file in the browser. > > Best, > Haris > > On Sun, Sep 18, 2022 at 7:29 PM Marc Schwartz wrote: > >> Hi, >> >> Did you type: >> >> library(mypac) >> >> first, before trying ?foo? >> >> The behavior suggests that the package is not currently loaded in the >> search path, hence the error. >> >> When you use ?mypac::foo, that explicitly tells R that you want the help >> for the function which is located in mypac and looks for the file there. >> Without the package prefix, it only looks in the current search path, and >> thus does not find the package there. >> >> Regards, >> >> Marc Schwartz >> >> >> On September 18, 2022 at 4:54:05 AM, Haris Fawad via ESS-help ( >> ess-help@r-project.org (mailto:ess-help@r-project.org)) wrote: >> >> > Hi, >> > >> > I get the following error when I try to open the help file on a >> > function >> > 'mypac::foo'. >> > >> > "ess-r-help--build-help-command--unqualified: Can’t find documentation >> for >> > ‘foo’". >> > >> > I get the error when I type '?foo', but not when I type '?mypac::foo'. >> > Indeed, the file 'man/foo.Rd' exists, after I run >> > 'devtools::document()'. >> > >> > I don't get the error when I request documentation for a standard >> > R-function, such as '?sum'. >> > >> > [[alternative HTML version deleted]] >> > >> > __ >> > ESS-help@r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/ess-help >> >> > > [[alternative HTML version deleted]] > > __ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] Can't find documentation for function
Hi Marc, Yes, I load the package via devtools::load_all() before typing ?foo. When I do the same in the R GUI-app I get the expected behaviour: the documentation gets rendered and shown as an html file in the browser. Best, Haris On Sun, Sep 18, 2022 at 7:29 PM Marc Schwartz wrote: > Hi, > > Did you type: > > library(mypac) > > first, before trying ?foo? > > The behavior suggests that the package is not currently loaded in the > search path, hence the error. > > When you use ?mypac::foo, that explicitly tells R that you want the help > for the function which is located in mypac and looks for the file there. > Without the package prefix, it only looks in the current search path, and > thus does not find the package there. > > Regards, > > Marc Schwartz > > > On September 18, 2022 at 4:54:05 AM, Haris Fawad via ESS-help ( > ess-help@r-project.org (mailto:ess-help@r-project.org)) wrote: > > > Hi, > > > > I get the following error when I try to open the help file on a function > > 'mypac::foo'. > > > > "ess-r-help--build-help-command--unqualified: Can’t find documentation > for > > ‘foo’". > > > > I get the error when I type '?foo', but not when I type '?mypac::foo'. > > Indeed, the file 'man/foo.Rd' exists, after I run 'devtools::document()'. > > > > I don't get the error when I request documentation for a standard > > R-function, such as '?sum'. > > > > [[alternative HTML version deleted]] > > > > __ > > ESS-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/ess-help > > [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] Can't find documentation for function
Hi, Did you type: library(mypac) first, before trying ?foo? The behavior suggests that the package is not currently loaded in the search path, hence the error. When you use ?mypac::foo, that explicitly tells R that you want the help for the function which is located in mypac and looks for the file there. Without the package prefix, it only looks in the current search path, and thus does not find the package there. Regards, Marc Schwartz On September 18, 2022 at 4:54:05 AM, Haris Fawad via ESS-help (ess-help@r-project.org (mailto:ess-help@r-project.org)) wrote: > Hi, > > I get the following error when I try to open the help file on a function > 'mypac::foo'. > > "ess-r-help--build-help-command--unqualified: Can’t find documentation for > ‘foo’". > > I get the error when I type '?foo', but not when I type '?mypac::foo'. > Indeed, the file 'man/foo.Rd' exists, after I run 'devtools::document()'. > > I don't get the error when I request documentation for a standard > R-function, such as '?sum'. > > [[alternative HTML version deleted]] > > __ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help