[Rd] Unable to reload Rdoc

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jan 27 11:26:21 CET 2012


This is simply not supported.  Lazy-load databases are cached, and you 
cannot expect to change them during the R session once they have been used.

Spend the few milliseconds needed to start a new session.

And R CMD Rdconv is a much simpler way to check a changed .Rd file.

On 27/01/2012 09:47, Mark Cowley 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.

You were warned ....

>
> 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")
>> install("~/src/R/updateR")
> Installing updateR
> * checking for file ‘/Users/marcow/src/R/updateR/DESCRIPTION’ ... OK
> * preparing ‘updateR’:
> * checking DESCRIPTION meta-information ... OK
> * checking for LF line-endings in source and make files
> * checking for empty or unneeded directories
> * building ‘updateR_1.0.4.tar.gz’
>
> Warning in normalizePath(c(new, .Library.site, .Library), "/") :
>    path[3]="": No such file or directory
> * installing *source* package ‘updateR’ ...
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
>
> * DONE (updateR)
> Reloading installed updateR
>> ?get.full.path
> Error in fetch(key) : internal error -3 in R_decompress1
>
> 2) using detach + library
> $ R --vanilla
> library(updateR)
> # ?list.my.packages
> detach(pos=2, unload=TRUE, force=TRUE)
> #<<make a change to an Rd file>>
> system("cd ~/src/R&&  R CMD BUILD updateR&&  R CMD INSTALL updateR")
> library("updateR")
> ?list.my.packages
> Error in fetch(key) : internal error -3 in R_decompress1
>
>
> 3) using unloadNamespace
> $ R --vanilla
> library(updateR)
> # ?list.my.packages
> unloadNamespace("updateR")
> #<<make a change to an Rd file>>
> system("cd ~/src/R&&  R CMD BUILD updateR&&  R CMD INSTALL updateR")
> library("updateR")
> ?list.my.packages
> Error in fetch(key) : internal error -3 in R_decompress1
>
>
>> sessionInfo()
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_AU.UTF-8/en_AU.UTF-8/C/C/en_AU.UTF-8/en_AU.UTF-8
>
> attached base packages:
> [1] tools     stats     graphics  grDevices datasets  utils     methods
> [8] base
>
> other attached packages:
> [1] updateR_1.0.4   codetools_0.2-8 devtools_0.4
>
> loaded via a namespace (and not attached):
> [1] RCurl_1.6-7
>
> -----------------------------------------------------
> Mark Cowley, PhD
>
> Pancreatic Cancer Program | Peter Wills Bioinformatics Centre
> Garvan Institute of Medical Research, Sydney, Australia
> -----------------------------------------------------
>
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list