Re: [Rd] Unable to reload Rdoc

From: Hadley Wickham <hadley_at_rice.edu>
Date: Fri, 27 Jan 2012 08:15:45 -0600

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
> R CMD BUILD,
> R CMD INSTALL
> 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.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 27 Jan 2012 - 14:19:00 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Jan 2012 - 22:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive