[R] weird error with a lazyload .RData file in a package

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Mar 29 17:05:44 CET 2013



On 29.03.2013 15:24, Michael Friendly wrote:
> I added a new data file, NLSY.RData, to a package that uses LazyData: Yes
> It passed R CRAN check and R CMD install worked w/o significant complaints.
>
> * installing to library 'C:/R/R-2.15.2/library'
> * installing *source* package 'heplots' ...
> ** R
> ** data
> **  moving datasets to lazyload DB
> ** demo
> ** inst
> ** preparing package for lazy loading
> Warning: package 'nnet' was built under R version 2.15.3
> ** help
>   ...
>
> Yet, when I try to use it, I get something incomprehensible:
>
>  > library(heplots)
>  > str(NLSY)
> Error in str(NLSY) : internal error -3 in R_decompress1
> In addition: Warning message:
> In str(NLSY) : restarting interrupted promise evaluation
>  >
>
> But it works if I load directly from the file I imported into the package:
>
>  > load("NLSY.RData")
>  > str(NLSY)
> 'data.frame':   243 obs. of  6 variables:
>   $ math    : num  50 28.6 50 32.1 21.4 ...
>   $ read    : num  45.2 28.6 53.6 34.5 22.6 ...
>   $ antisoc : int  4 0 2 0 0 1 0 1 1 4 ...
>   $ hyperact: int  3 0 2 2 2 0 1 4 3 5 ...
>   $ income  : num  52.52 42.6 50 6.08 7.41 ...
>   $ educ    : int  14 12 12 12 14 12 12 12 12 9 ...
>
> What could cause this?
>

No idea. Can you make the package source (incl that Rdata file) available?

Best,
Uwe Ligges



More information about the R-help mailing list