Domanda

My emacs/ess session crashes when I try to access help. This happens if I have two packages loaded with the same functions; for example:

library(lubridate)
library(data.table)
?month

In Rgui interface pops out and asks to choose from which packages I want help. Emacs just crashes. Similar issues happens with install.packages, but there is a way to specify mirror Is there a way to install R packages using emacs? Is there a similar trick with help?

È stato utile?

Soluzione

Well, there is no full proof solution for time being as nobody really understands why these crashes happen. I assume you are on windows, right?

There are plans in ESS to completely internalize all the help (and other) calls in order not to depend on R dialogs. Hopefully in the next version.

For time being put this into your .Rprofile

tis <- utils:::index.search
formals(tis)[["firstOnly"]] <- TRUE
assignInNamespace("index.search", tis, "utils")

It basically makes help system to pick the first package with the found topic. In your case month help page in data.table package will be ignored. Not a big deal as common topic names are quite rare anyways.

Altri suggerimenti

I found out that starting library(tcltk) solves this problem. Menu appears even after it is called from emacs+ess. I added library(tcltk) to my Rprofile.site and now everything works great, install.packages() and accessing help when multiple packages load same function

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top