You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scale_y_continuous() fails if inside a function called via double colon pkg::fun(...) #5436
I found a problem with recent PR #5343 when scale_y_continuous was called inside a package function via double colon
I expected the function not to throw an error
Here is the code to reproduce the bug:
Please note that the problem is not with {tern} itself, as the call without double colon succeeds
install.package("tern")
remotes::install_github("tidyverse/ggplot2")
library(tern)
# example from tern::g_lineplot function
library(nestcolor)
adsl<-tern_ex_adsladlb<-tern_ex_adlb %>% dplyr::filter(ANL01FL=="Y", PARAMCD=="ALT", AVISIT!="SCREENING")
adlb$AVISIT<- droplevels(adlb$AVISIT)
adlb<-dplyr::mutate(adlb, AVISIT=forcats::fct_reorder(AVISIT, AVISITN, min))
g_lineplot(adlb, adsl, subtitle="Laboratory Test:")
# This call falls on if clause `... && !startsWith(as.character(call[[1]]), "scale_")` as it has length = 3tern::g_lineplot(adlb, adsl, subtitle="Laboratory Test:")
Activity
teunbrand commentedon Sep 26, 2023
Thanks for the report! I can reproduce this bug. A more minimal reprex:
Created on 2023-09-26 with reprex v2.0.2
Fix tidyverse#5436
Scale call check (#5443)
Adds min package version (#1012)