Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_CI() gives error: Can't find stat called 'stepribbon' #449

Closed
kawap93 opened this issue Aug 4, 2022 · 2 comments
Closed

add_CI() gives error: Can't find stat called 'stepribbon' #449

kawap93 opened this issue Aug 4, 2022 · 2 comments
Labels
bug Something isn't working issue Used for project filtering

Comments

@kawap93
Copy link

kawap93 commented Aug 4, 2022

Issue description

We use add_CI() method in Kaplan Meier Analysis and last changes in newest version 0.3.0.9003 broke up this in our dashboard.
In last commit @ddsjoberg has created custom ggproto object StatStepribbon and used that in add_CI() what cause an error Can't find stat called 'stepribbon' when visR package is not loaded.

Steps to reproduce the issue

When you will not load library(visR) then we can see that:

p <- visR::adtte %>%
  visR::estimate_KM(strata = "SEX") %>%
  visR::visr()

p %>%
visR::add_CI()

will cause the error.

What's the expected result?

We should be able to use add_CI() referring it by visR::add_CI() without loading all package.

What's the actual result?

  • currently in the code it's like:
gg <- gg +
      ggplot2::geom_ribbon(ggplot2::aes(
        ymin = est.lower,
        ymax = est.upper
      ),
      stat = "stepribbon",
      na.rm = TRUE,
      show.legend = FALSE
      ) +
      ggplot2::scale_fill_manual(values = ggplot2::alpha(strata_colours, alpha))

stat = "stepribbon" cause a problem.

Additional details / screenshot

and I am asking if my pr: #448
can solve the problem?

@kawap93 kawap93 added bug Something isn't working issue Used for project filtering labels Aug 4, 2022
@kawap93 kawap93 mentioned this issue Aug 4, 2022
12 tasks
bailliem added a commit that referenced this issue Aug 5, 2022
add visR namespace to step_ribbon function call re issue #449
@bailliem
Copy link
Collaborator

bailliem commented Aug 5, 2022

@kawap93 - could you check the current patch resolves the issue? We still need to add additional unit tests on add_CI to account for the addition of step_ribbon in issue #443

@bailliem
Copy link
Collaborator

close with #450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue Used for project filtering
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants