[R] Stuck on building a package

Duncan Murdoch murdoch at stats.uwo.ca
Sun Mar 15 13:12:51 CET 2009


On 15/03/2009 4:46 AM, Ajay Shah wrote:
> Folks,
> 
> I have a personal package which used to build fine. Today when I tried
> to build the package again, some errors popped up. Could you please
> help? 

Generally questions about building packages are better in R-devel.


When I paste the offending function into an R it works
> correctly. But the package build breaks.
> 
> $ R CMD check ansecon
> * checking for working pdflatex ... OK
> * using log directory '/Users/ajayshah/L/R/packages/ansecon.Rcheck'
> * using R version 2.8.1 (2008-12-22)
> * using session charset: ASCII
> * checking for file 'ansecon/DESCRIPTION' ... OK
> * this is package 'ansecon' version '0.1'
> * checking package dependencies ... OK
> * checking if this is a source package ... OK
> * checking for executable files ... OK
> * checking whether package 'ansecon' can be installed ... ERROR
> Installation failed.
> See '/Users/ajayshah/L/R/packages/ansecon.Rcheck/00install.out' for details.
> make: *** [check] Error 1
> 
> 
> And 
> $ more /Users/ajayshah/L/R/packages/ansecon.Rcheck/00install.out
> * Installing *source* package 'ansecon' ...
> ** R
> ** preparing package for lazy loading
> Loading required package: zoo
> 
> Attaching package: 'zoo'
> 
> 
>         The following object(s) are masked from package:base :
> 
>          as.Date.numeric 
> 
> Error in parse(n = -1, file = file) : unexpected end of input at
> 63: ft=winsorised.left, winsorised.right=winsorised.right)
> 64: }

That's a syntax error in one of your files.  Usually an unexpected end 
of input means you opened more braces than you closed, but there are 
other ways to get the same error:  it just means the statement it was 
parsing was incomplete when it ran out of input.

The line numbers 63 and 64 are probably not helpful; the package check 
process manipulates the code a bit before it passes it to the parser. (I 
think R-devel will give better error messages in this regard.)

Duncan Murdoch


> Calls: <Anonymous> -> code2LazyLoadDB -> sys.source -> parse
> Execution halted
> ERROR: lazy loading failed for package 'ansecon'
> ** Removing '/Users/ajayshah/L/R/packages/ansecon.Rcheck/ansecon'
>




More information about the R-help mailing list