Page MenuHomePhabricator

significanceMap function raises warning about deprecated function call
Closed, ResolvedPublic

Description

Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.

Event Timeline

@eisenman I don't get this warning. Could you give more details/ an example? or is this already solved/not relevant anymore?

comes from significanceMap.data.frame

th_get=theme_get()
 # grid on top
   lt=th_get$panel.grid$linetype
   if (is.null(lt)) lt=th_get$line$linetype

 #p=p+theme(panel.background = element_rect(fill = NA),panel.ontop=TRUE) #-> grid will be on top of diagonal
 #fix:
  f=ggplot_build(p)
   p= p + geom_vline(xintercept=f$layout$panel_params[[1]]$x.major_source,
                     linetype=lt,
                     color=th_get$panel.grid$colour,
                     size=rel(th_get$panel.grid.major$size))+
     geom_hline(yintercept=f$layout$panel_params[[1]]$y.major_source,
                linetype=lt,
                color=th_get$panel.grid$colour,
                size=rel(th_get$panel.grid.major$size))+
     geom_abline(slope=1)+
     geom_text(aes(x=algorithm,y=fixy,label=rank),
               nudge_y=.5,
               vjust = 0,
               size=size.rank,
               fontface="plain",family="sans"
     )

rel(th_get$panel.grid.major$size) is rel(NULL) raising the warning