[R] Building package problem

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Nov 8 15:56:10 CET 2011



On 08.11.2011 13:50, Joshua Wiley wrote:
> Hi Ed,
>
> If the only error is in examples then this should work:
>
> R CMD check --no-examples foopkg


Disabling the example checks is not the solution - well, it is the one 
to hide the errors, of course.


> should not have anything to do with vignettes (although those may also
> not run, who knows).  As far as building a binary, look at:
>
> R CMD INSTALL --help
>
> which leads you to
>
> R CMD INSTALL --build foopkg


... and was the recommended way to build binaries as long as I am 
maintaining the Windows binaries on CRAN (which is more than 8 years, I 
think), if I remember correctly.



> HTH,
>
> Josh
>
>
>
> On Tue, Nov 8, 2011 at 4:35 AM, Eduardo M. A. M. Mendes
> <emammendes at gmail.com>  wrote:
>> Dear R-users
>>
>> I am trying to recompile a CRAN package on Windows 32.   Rtools for 2.14 (that is the version I am running) and miktex were sucessfully installed on my machine.
>>
>> Problems:
>>
>> a) hydroGOF is a CRAN package, but R CMD check does not work on it.


It works on it and tells you there is an error. Since the CRAN check 
summary pages do not show that error, I anticipate your unstated 
versions of zoo and/or other packages are outdated. Please update all 
your packages an dtry again.

Best,
Uwe Ligges






>>
>> C:\Users\eduardo\Documents\R_tests2>R CMD check hydroGOF
>> * using log directory 'C:/Users/eduardo/Documents/R_tests2/hydroGOF.Rcheck'
>> * using R version 2.14.0 (2011-10-31)
>> * using platform: i386-pc-mingw32 (32-bit)
>> * using session charset: ISO8859-1
>> * checking for file 'hydroGOF/DESCRIPTION' ... OK
>> * checking extension type ... Package
>> * this is package 'hydroGOF' version '0.3-2'
>> * checking package namespace information ... OK
>> * checking package dependencies ... OK
>> * checking if this is a source package ... OK
>> * checking if there is a namespace ... OK
>> * checking for executable files ... OK
>> * checking whether package 'hydroGOF' can be installed ... OK
>> * checking installed package size ... OK
>> * checking package directory ... OK
>> * checking for portable file names ... OK
>> * checking DESCRIPTION meta-information ... OK
>> * checking top-level files ... OK
>> * checking index information ... OK
>> * checking package subdirectories ... OK
>> * checking R files for non-ASCII characters ... OK
>> * checking R files for syntax errors ... OK
>> * checking whether the package can be loaded ... OK
>> * checking whether the package can be loaded with stated dependencies ... OK
>> * checking whether the package can be unloaded cleanly ... OK
>> * checking whether the namespace can be loaded with stated dependencies ... OK
>> * checking whether the namespace can be unloaded cleanly ... OK
>> * checking for unstated dependencies in R code ... OK
>> * checking S3 generic/method consistency ... OK
>> * checking replacement functions ... OK
>> * checking foreign function calls ... OK
>> * checking R code for possible problems ... OK
>> * checking Rd files ... OK
>> * checking Rd metadata ... OK
>> * checking Rd cross-references ... OK
>> * checking for missing documentation entries ... OK
>> * checking for code/documentation mismatches ... OK
>> * checking Rd \usage sections ... OK
>> * checking Rd contents ... OK
>> * checking for unstated dependencies in examples ... OK
>> * checking contents of 'data' directory ... OK
>> * checking data for non-ASCII characters ... OK
>> * checking data for ASCII and uncompressed saves ... OK
>> * checking examples ... ERROR
>> Running examples in 'hydroGOF-Ex.R' failed
>> The error most likely occurred in:
>>
>>> ### Name: plot2
>>> ### Title: Plotting 2 Time Series
>>> ### Aliases: plot2
>>> ### Keywords: dplot
>>>
>>> ### ** Examples
>>>
>>> sim<- 2:11
>>> obs<- 1:10
>>> ## Not run:
>>> ##D plot2(sim, obs)
>>> ## End(Not run)
>>>
>>> ##################
>>> # Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
>>> require(zoo)
>> Loading required package: zoo
>>
>> Attaching package: 'zoo'
>>
>> The following object(s) are masked from 'package:base':
>>
>>     as.Date, as.Date.numeric
>>
>>> data(EgaEnEstellaQts)
>>> obs<- EgaEnEstellaQts
>>>
>>> # Generating a simulated daily time series, initially equal to the observed se
>> ries
>>> sim<- obs
>>>
>>> # Randomly changing the first 2000 elements of 'sim', by using a normal distri
>> bution
>>> # with mean 10 and standard deviation equal to 1 (default of 'rnorm').
>>> sim[1:2000]<- obs[1:2000] + rnorm(2000, mean=10)
>>>
>>> # Plotting 'sim' and 'obs' in 2 separate panels
>>> plot2(x=obs, y=sim)
>>>
>>> # Plotting 'sim' and 'obs' in the same window
>>> plot2(x=obs, y=sim, plot.type="single")
>> Error in as.POSIXlt.character(x, tz, ...) :
>>   character string is not in a standard unambiguous format
>> Calls: plot2 ... as.POSIXct.default ->  as.POSIXct ->  as.POSIXlt ->  as.POSIXlt.ch
>> aracter
>> Execution halted
>>
>> b) option --binary is no longer available, is that so?  How can an extension zip can be built on Windows?
>>
>> R CMD build --no-vignettes hydroGOF works.   And R CMD INSTALL hydroGOFxx.tar.gz too.
>>
>> Many thanks
>>
>> Ed
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>



More information about the R-help mailing list