[R] Building package problem

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Nov 11 13:57:11 CET 2011


The posting guide asks for the output of sessionInfo() ....
And what does Sys.timezone() say (it isn't always helpful).


On Fri, 11 Nov 2011, Eduardo Mendes wrote:

> Hello
> Many thanks for the replies.
> 
> I am note sure whether you've got what you meant (Prof. Ripley) but here is the
> output of Sys.getlocale()
> 
> > Sys.getlocale()
> [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC
> _MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1
> 252"
> 
> Is that what you meant?
> 
> Many thanks
> 
> Ed
> 
> 
> On Tue, Nov 8, 2011 at 1:03 PM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>       R CMD check is *not* 'building a package'.  Nor is making a Windows
>       binary package.  'Building a package' is creating a source tarball
>       from a source directory.
>
>       On Tue, 8 Nov 2011, Joshua Wiley wrote:
>
>             Hi Ed,
>
>             If the only error is in examples then this should work:
>
>             R CMD check --no-examples foopkg
>
>             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 as for the hydroGOF issue, my guess is that the problem is your locale
> or timezone.  But despite the posting guide, you failed to tell us. AFAIK
> CRAN only checks packages in English locales.
> 
> (One thing we know is that in Columbia there was no midnight on one of the
> dates in that file.  So hydroGOF really ought to be specifying a timezone
> when reading character datetimes.)
> 
> 
>
>       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.
>
>             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.
> 
> 
> 
>
>       --
>       Joshua Wiley
>       Ph.D. Student, Health Psychology
>       Programmer Analyst II, ATS Statistical Consulting Group
>       University of California, Los Angeles
>       https://joshuawiley.com/
>
>       ______________________________________________
>       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.
> 
> 
> --
> 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
> 
> 
> 
>

-- 
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-help mailing list