[Rd] Unable to reload Rdoc

Hadley Wickham hadley at rice.edu
Fri Jan 27 15:15:45 CET 2012

On Fri, Jan 27, 2012 at 3:47 AM, Mark Cowley <m.cowley at garvan.org.au> wrote:
> Dear list,
> I'm hoping the R guru's can help with an error i've been getting for at least a year during active package development.
> I have a package loaded & spot a documentation bug, so I:
> edit the Rd file (or in the roxygen header + roxygenize); then
> then in the same R session, reload the library & lookup a man page, I always get this error:
> Error in fetch(key) : internal error -3 in R_decompress1
> I've tried all ways of reloading the package that i'm aware of:
> detach then library
> unloadNamespace then library
> devtools::install
> devtools::reload
> all lead to the error.
> I see from ?detach:
> ... So detaching and re-attaching a package may
> not refresh some or all components of the package, and is
> inadvisable.
> restarting the R session results in loading the updated man file, but do you have any ideas how to word around this & continue within the same R session?
> cheers,
> Mark
> # 1) using Hadley's devtools
>> library(devtools)
>> library(updateR) # my package under development
>> install("~/src/R/updateR")

To avoid this problem, the latest version of devtools has show_rd(),
which allows you to preview an Rd file in R without having to
reinstall the package.  This was actually really simple to implement,
and I don't know why I didn't think of it ages ago - it's certainly
made my workflow much smoother.


Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University

More information about the R-devel mailing list