Skip to content

Conversation

@rschauner
Copy link

Meant to fix my issue (#570). During axis ticks generation, if there are any near 0 or Inf values, they are set to the min and max values across all confidence intervals.

Things I thought would be nice but didn't know how to include.

  • Some way to know where the estimate is if it is outside the plot range.
  • Arrows to know the CI continues outside the plot area.

I was planning on just adding that in Adobe Illustrator, but, that might be something that could be done by ggplot2.

Apologies about all the changes, my linter in Visual Studio Code seemed to take over


# get data and variables/terms from cox model
data <- .get_data(model, data = data)
data <- survminer:::.get_data(model, data = data)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

survminer::: should be removed

allTerms <- lapply(seq_along(terms), function(i){
allTerms <- lapply(seq_along(terms), function(i) {
var <- names(terms)[i]
#### ADD with = FALSE because error during testing
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a data.table version thing, data.table version is 1.14.0

# flip order
toShowExpClean <- toShowExpClean[nrow(toShowExpClean):1, ]

# get min/max CI values to place where Inf would be
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get min/max CI values and replace near 0 and Inf values with those

@rschauner rschauner mentioned this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant