Re: [R-pkg-devel] warning from win_build

2016-12-30 Thread Duncan Murdoch

On 29/12/2016 6:50 PM, Duncan Murdoch wrote:

On 29/12/2016 2:58 PM, Roy Mendelssohn - NOAA Federal wrote:

HI All:

If any cares,  the offending line is in the  ggplot2  file utilities.r where it 
has:


#' A waiver object.
#'
#' A waiver is a "flag" object, similar to \code{NULL}, that indicates the
#' calling function should just use the default value.  It is used in certain
#' functions to distinguish between displaying nothing (\code{NULL}) and
#' displaying a default value calculated elsewhere (\code{waiver()})
#'
#' @export
#' @keywords internal
waiver <- function() structure(NULL, class = "waiver")

is.waive <- function(x) inherits(x, "waiver")


If you then do a multi-file search on "waive" you find that it is used all 
throughout the code base, so anytime waiver() is called, so is the NULL structure.


That usage will work:  though waiver() tries to put a class on NULL,
structure() puts it on a length-zero list instead.  R-devel's complaint
is unnecessary here, but could be avoided with the code change

waiver <- function() structure(list(), class = "waiver")

I've cc'd Hadley to let him know.


Hadley submitted a patch, which is on CRAN now (version 2.2.1).  It will 
take a little while to propagate to the mirrors, but things should be 
fine in your package once you update ggplot2.


Duncan Murdoch



Duncan Murdoch




-Roy






On Dec 29, 2016, at 11:44 AM, Roy Mendelssohn - NOAA Federal 
 wrote:

Thanks.  I can wait.  I will also see if I can figure out a work around in the 
meantime.  Is the submission to winbuild automated?  That is really the only 
way I have to check, but I don't want to keep on checking if someone's time is 
being wasted by that.  If automated,  the I don't mind making repeated 
submissions.

Thanks again,

-Roy




On Dec 29, 2016, at 11:40 AM, Duncan Murdoch  wrote:

On 29/12/2016 1:44 PM, Roy Mendelssohn - NOAA Federal wrote:

Thanks,  but as I said,  my next question is how best to proceed with CRAN.  I 
do not want to waste peoples' time with a submission that I know before hand 
will be rejected.   Can I submit with this warning?


I'd recommend waiting a few days.  If you really want to submit soon, you can 
figure out which is the offending command, and wrap it in something that 
suppresses the warning (e.g. suppressWarnings(), assuming the conversion to an 
error happens later).

I don't think your package would be accepted if the vignette won't build on 
R-devel.

Duncan Murdoch


-Roy



On Dec 29, 2016, at 10:38 AM, Duncan Murdoch  wrote:

On 29/12/2016 1:24 PM, Ben Bolker wrote:

Sorry, correction/clarification to my last post: it's *not* a bug in
ggplot2, rather apparently (?) it's something in base R that has broken
tests in both data.table and ggplot2. (Since your code calls ggplot,
though, it's presumably in there somewhere, and (?) not your problem.)


The NEWS item is here:

http://developer.r-project.org/blosxom.cgi/R-devel/2016/12/28#n2016-12-28

The issue is discussed in a bit more detail on R-devel (subject "[Rd] Unexpected I(NULL) 
output") and .

Overall it seems like a good idea:  some code (perhaps in ggplot2, I haven't 
tried to track it down) appears to be trying to set attributes on NULL.  This 
will silently fail in versions of R prior to R-devel rev 71841, and will fail 
with a warning in that version or later.  (Since the change to R-devel is very 
recent, it may change again.)

Duncan Murdoch



cheers
 Ben



On 16-12-29 01:16 PM, Roy Mendelssohn - NOAA Federal wrote:

Hi All:

I am working on a new submission of my xtractomatic package  (the
main change being the use of https).  I develop on a Mac.  When I run
on the Mac:

devtools::check()

I get no errors, notes, or warnings.  However, when I run
devtools::build_win(), the response I get back isL



* checking for unstated dependencies in vignettes ... OK * checking
package vignettes in 'inst/doc' ... OK * checking re-building of
vignette outputs ... WARNING Error in re-building vignettes: ...
Quitting from lines 248-261 (Usingxtractomatic.Rmd) Error:
processing vignette 'Usingxtractomatic.Rmd' failed with
diagnostics: (converted from warning) Calling 'structure(NULL, *)'
is deprecated, as NULL cannot have attributes. Consider
'structure(list(), *)' instead. Execution halted



So this error is from my Vignette.  The offending lines appear to
be:


```{r topotagPlot, fig.align = 'center', fig.width = 6, fig.height
= 4, warning = FALSE} require("ggplot2") alldata <- cbind(tagData,
topo) alldata$lon <- alldata$lon - 360 z <- ggplot(alldata, aes(x =
lon,y = lat)) + geom_point(aes(colour = mean), size = 2.) +
scale_shape_manual(values = c(19, 1)) z + geom_polygon(data = w,
aes(x = long, y = lat, group = group), fill = "grey80") +
theme_bw() + scale_colour_gradient("Depth") + coord_fixed(1.3, xlim
= xlim, ylim = ylim) + ggtitle("Bathymetry at marlin tag
locations")

```




Now the vignette builds fine on my machine,  and  I ca

Re: [R-pkg-devel] warning from win_build

2016-12-30 Thread Roy Mendelssohn - NOAA Federal
Thanks to all.  

I will give it several days to work it's way through.  In my case,  I need for 
it to be on build_win.

Happy new year,

-Roy


> On Dec 30, 2016, at 1:49 PM, Duncan Murdoch  wrote:
> 
> On 29/12/2016 6:50 PM, Duncan Murdoch wrote:
>> On 29/12/2016 2:58 PM, Roy Mendelssohn - NOAA Federal wrote:
>>> HI All:
>>> 
>>> If any cares,  the offending line is in the  ggplot2  file utilities.r 
>>> where it has:
>>> 
 #' A waiver object.
 #'
 #' A waiver is a "flag" object, similar to \code{NULL}, that indicates the
 #' calling function should just use the default value.  It is used in 
 certain
 #' functions to distinguish between displaying nothing (\code{NULL}) and
 #' displaying a default value calculated elsewhere (\code{waiver()})
 #'
 #' @export
 #' @keywords internal
 waiver <- function() structure(NULL, class = "waiver")
 
 is.waive <- function(x) inherits(x, "waiver")
>>> 
>>> If you then do a multi-file search on "waive" you find that it is used all 
>>> throughout the code base, so anytime waiver() is called, so is the NULL 
>>> structure.
>> 
>> That usage will work:  though waiver() tries to put a class on NULL,
>> structure() puts it on a length-zero list instead.  R-devel's complaint
>> is unnecessary here, but could be avoided with the code change
>> 
>> waiver <- function() structure(list(), class = "waiver")
>> 
>> I've cc'd Hadley to let him know.
> 
> Hadley submitted a patch, which is on CRAN now (version 2.2.1).  It will take 
> a little while to propagate to the mirrors, but things should be fine in your 
> package once you update ggplot2.
> 
> Duncan Murdoch
> 
>> 
>> Duncan Murdoch
>> 
>> 
>>> 
>>> -Roy
>>> 
>>> 
>>> 
>>> 
 
 On Dec 29, 2016, at 11:44 AM, Roy Mendelssohn - NOAA Federal 
  wrote:
 
 Thanks.  I can wait.  I will also see if I can figure out a work around in 
 the meantime.  Is the submission to winbuild automated?  That is really 
 the only way I have to check, but I don't want to keep on checking if 
 someone's time is being wasted by that.  If automated,  the I don't mind 
 making repeated submissions.
 
 Thanks again,
 
 -Roy
 
 
 
> On Dec 29, 2016, at 11:40 AM, Duncan Murdoch  
> wrote:
> 
> On 29/12/2016 1:44 PM, Roy Mendelssohn - NOAA Federal wrote:
>> Thanks,  but as I said,  my next question is how best to proceed with 
>> CRAN.  I do not want to waste peoples' time with a submission that I 
>> know before hand will be rejected.   Can I submit with this warning?
> 
> I'd recommend waiting a few days.  If you really want to submit soon, you 
> can figure out which is the offending command, and wrap it in something 
> that suppresses the warning (e.g. suppressWarnings(), assuming the 
> conversion to an error happens later).
> 
> I don't think your package would be accepted if the vignette won't build 
> on R-devel.
> 
> Duncan Murdoch
> 
>> -Roy
>> 
>> 
>>> On Dec 29, 2016, at 10:38 AM, Duncan Murdoch  
>>> wrote:
>>> 
>>> On 29/12/2016 1:24 PM, Ben Bolker wrote:
 Sorry, correction/clarification to my last post: it's *not* a bug in
 ggplot2, rather apparently (?) it's something in base R that has broken
 tests in both data.table and ggplot2. (Since your code calls ggplot,
 though, it's presumably in there somewhere, and (?) not your problem.)
>>> 
>>> The NEWS item is here:
>>> 
>>> http://developer.r-project.org/blosxom.cgi/R-devel/2016/12/28#n2016-12-28
>>> 
>>> The issue is discussed in a bit more detail on R-devel (subject "[Rd] 
>>> Unexpected I(NULL) output") and 
>>> .
>>> 
>>> Overall it seems like a good idea:  some code (perhaps in ggplot2, I 
>>> haven't tried to track it down) appears to be trying to set attributes 
>>> on NULL.  This will silently fail in versions of R prior to R-devel rev 
>>> 71841, and will fail with a warning in that version or later.  (Since 
>>> the change to R-devel is very recent, it may change again.)
>>> 
>>> Duncan Murdoch
>>> 
 
 cheers
 Ben
 
 
 
 On 16-12-29 01:16 PM, Roy Mendelssohn - NOAA Federal wrote:
> Hi All:
> 
> I am working on a new submission of my xtractomatic package  (the
> main change being the use of https).  I develop on a Mac.  When I run
> on the Mac:
> 
> devtools::check()
> 
> I get no errors, notes, or warnings.  However, when I run
> devtools::build_win(), the response I get back isL
> 
> 
>> * checking for unstated dependencies in vignettes ... OK * checking
>> package vignettes in 'inst/doc' ... OK * checking re-building of
>> vignette outpu