[ESS] Can't find documentation for function

Lionel Henry ||one|@hry @end|ng |rom gm@||@com
Mon Sep 19 12:02:03 CEST 2022


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 <ess-help using r-project.org> 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 <marc_schwartz using me.com> 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 using r-project.org (mailto:ess-help using 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 using r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>



More information about the ESS-help mailing list