From murdoch.duncan at gmail.com  Sun Oct 27 13:56:31 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Sun, 27 Oct 2013 08:56:31 -0400
Subject: [Rd] R CMD check problem with R 3.0.2
In-Reply-To: <63F17EA6-66E3-4C6D-9FF6-E17DBB6B084A@r-project.org>
References: <CADkZVY7vuQv_nS+H_Xvb25v6k4tS9steZ86RkLhteGxK_9YHug@mail.gmail.com>	<CANROs4c=0JJ0uefWezkPwYvCkZYGTLwszJ7xGJJ1REOjfGLzGA@mail.gmail.com>
	<63F17EA6-66E3-4C6D-9FF6-E17DBB6B084A@r-project.org>
Message-ID: <526D0D7F.9010707@gmail.com>

On 13-10-26 9:49 PM, Simon Urbanek wrote:
> On Oct 25, 2013, at 12:12 PM, Yihui Xie wrote:
>
>> This has been asked soooo many times that I think it may be a good
>> idea for R CMD check to just stop when the user passes a directory
>> instead of a tar ball to it, or automatically run R CMD build before
>> moving on. In my opinion, sometimes an FAQ and a bug are not entirely
>> different.
>>
>
> +1 -- and I'd do the same for R CMD INSTALL. If someone insists, there could be --force or something like that for those that really want to work on directories despite all the issues with that, but IMHO the default should be for both INSTALL and check to bail out if not presented with a file -- it would save a lot of people a lot of time spent in chasing ghost issues.

That seems like a reasonable suggestion.  I wouldn't want to lose the 
ability to install or check a directory; for development of packages 
like rgl which have a lot of compiled code, installing from a tarball 
takes a lot longer than installing when all of the code has already been 
compiled.

On the other hand, it isn't all that hard to put together an R function 
or shell script to do it (the hardest part is figuring out the name of 
the tarball).  For example:

installpkgdir <- function(dir) {
   x <- system(paste("R CMD build", dir), intern=TRUE)
   cat(x, sep="\n")
   tarball <- grep("^\\* building '", x, value = TRUE)
   if (length(tarball) == 1) {
     tarball <- sub("^\\* building '", "", tarball)
     tarball <- sub("'$", "", tarball)
     system(paste("R CMD INSTALL", tarball))
   }
}

I haven't tested this much, and it doesn't offer options to the build or 
install steps, but it could be the basis of a simple function that 
always builds a tarball before installing a source directory.

Duncan Murdoch


> Cheers,
> Simon
>
>
>
>> Regards,
>> Yihui
>> --
>> Yihui Xie <xieyihui at gmail.com>
>> Web: http://yihui.name
>> Department of Statistics, Iowa State University
>> 2215 Snedecor Hall, Ames, IA
>>
>>
>> On Fri, Oct 25, 2013 at 10:37 AM, Sanford Weisberg <sandy at umn.edu> wrote:
>>> Using SUSE Linux, Windows 32 bit and Windows 64 bit R 3.0.2 , I am unable
>>> to use R CMD check successfully.  Here is the Windows 64 bit report:
>>>
>>>
>>> Z:\R\source\effects>R CMD check pkg
>>> * using log directory 'Z:/R/source/effects/pkg.Rcheck'
>>> * using R version 3.0.2 (2013-09-25)
>>> * using platform: x86_64-w64-mingw32 (64-bit)
>>> * using session charset: ISO8859-1
>>> * checking for file 'pkg/DESCRIPTION' ... ERROR
>>> Required fields missing or empty:
>>>   'Author' 'Maintainer'
>>>
>>> The file DESCRIPTION looks like this:
>>>
>>> Package: effects
>>> Version: 2.3-0
>>> Date: 2013/10/22
>>> Title: Effect Displays for Linear, Generalized Linear, Multinomial-Logit,
>>> Proportional-Odds Logit Models and Mixed-Effects Models
>>> Authors at R: c(person("John", "Fox", role = c("aut", "cre"), email = "
>>> jfox at mcmaster.ca"),
>>>     person("Sanford", "Weisberg", role = "aut", email = "sandy at umn.edu"),
>>>     person("Michael", "Friendly", role = "aut", email = "friendly at yorku.ca
>>> "),
>>>     person("Jangman", "Hong", role = "aut"),
>>>     person("Robert", "Andersen", role = "ctb"),
>>>     person("David", "Firth", role = "ctb"),
>>>     person("Steve", "Taylor", role = "ctb"))
>>> Depends: lattice, grid, colorspace
>>> Suggests: nlme, lme4, MASS, nnet, poLCA, heplots
>>> LazyLoad: yes
>>> LazyData: yes
>>> Description:
>>>   Graphical and tabular effect displays, e.g., of interactions, for linear
>>>   generalized linear, multinomial-logit, proportional-odds logit models,
>>>   mixed-effect models,  polytomous latent-class models and multivariate
>>> linear models.
>>> License: GPL (>= 2)
>>> URL: http://www.r-project.org, http://socserv.socsci.mcmaster.ca/jfox/
>>>
>>> The 'Author' and 'Maintainer' fields should be automatically generated.
>>> With version 3.0.1, I had no such problem, and my coauthors who use Eciplse
>>> and R-studio have no problems with R 3.0.2.  John Fox suggested the
>>> following:
>>>
>>> When R CMD build creates a package tarball it writes the information from
>>> Authors at R into the
>>> Author and Maintainer fields. I think that Sandy's
>>> problem is produced by checking the package source directory rather than a
>>> package source tarball. I use RStudio to check packages, and it
>>> automatically builds the tarball first, which is the recommended procedure.
>>> R-Forge does that too. Michael uses Eclipse, and if I remember right, it too
>>> creates a tarball (but I haven't used it in quite some time).
>>>
>>> Is this a bug in R CMD check?
>>>
>>>
>>> --
>>> Sanford Weisberg, sandy at umn.edu
>>> <sandy at umn.edu>
>>> For undergraduate matters:  undergrad at stat.umn.edu
>>> University of Minnesota, School of Statistics
>>> 312 Ford Hall, 224 Church St. SE, Minneapolis, MN  55455
>>> 612-625-8355, FAX 612-624-8868
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] R CMD check problem with R 3.0.2
Duncan Murdoch